Question

Привет всем. Начал писать чат, появилось дохреналион ошибок, прикреплю сами ошибки и код. Дайте намёк, как исправить их. Заранее спасибки!

 

Сами ошибки:

 

 


C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(384) : error 001: expected token: "-identifier-", but found "-integer value-"
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(386) : error 029: invalid expression, assumed zero
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(387) : warning 217: loose indentation
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(387) : error 017: undefined symbol "i"
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(387) : error 024: "break" or "continue" is out of context
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(388) : error 017: undefined symbol "i"
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(388) : error 024: "break" or "continue" is out of context
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(389) : error 017: undefined symbol "i"
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(389) : error 024: "break" or "continue" is out of context
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(390) : error 017: undefined symbol "i"
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(392) : error 017: undefined symbol "i"
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(396) : error 017: undefined symbol "i"
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(399) : error 010: invalid function or declaration
C:\Users\Àäìèí\Desktop\server sup\gamemodes\new.pwn(195) : warning 204: symbol is assigned a value that is never used: "mysql"
Pawn compiler 3.2.3664     Copyright (c) 1997-2006, ITB CompuPhase
 

 

 

Код:

 

 


stock ProxDetector(Float:radius, text[], color1 = 0xFFFFFFFF, color2 = 0xEAEAEAFF)
{
 
   GetPlayerPos(i, x, y, z);
   new world = GetPlayerVirtualWorld(playerid),
    interior = GetPlayerInterior(playerid);
   for(new 1; 1 < MAX_PLAYERS; 1++)
   {
    if(!IsPlayerConnected(1)) continue;
    if(!IsPlayerInRangeOfPoint(i, radius, x, y, z))continue;
    if(world == GetPlayerVirtualWorld(i))continue;
    if(interior != GetPlayerInterior(i))continue;
    if(IsPlayerInRangeOfPoint(i, radius / 2, x, y, z))
    {
   SendClientMessage(i, color1, text);
    }
    else
    {
   SendClientMessage(i, color2, text);
    }
   }
   return 1;
}
 

 

И паблик

 

 


public OnPlayerText(playerid, text[])
{
    ProxDetector(playerid, 20.0, text);
 return 0;
}
 

 

 

 

Share this post


Link to post

2 answers to this question

  • 0

Начнём с того, что Вы в stock ProxDetector не добавили ту самую i .

stock ProxDetector(i, Float:radius, text[], color1 = 0xFFFFFFFF, color2 = 0xEAEAEAFF)
{
 
   GetPlayerPos(i, x, y, z);
   new world = GetPlayerVirtualWorld(playerid),
    interior = GetPlayerInterior(playerid);
   for(new 1; 1 < MAX_PLAYERS; 1++)
   {
    if(!IsPlayerConnected(1)) continue;
    if(!IsPlayerInRangeOfPoint(i, radius, x, y, z))continue;
    if(world == GetPlayerVirtualWorld(i))continue;
    if(interior != GetPlayerInterior(i))continue;
    if(IsPlayerInRangeOfPoint(i, radius / 2, x, y, z))
    {
   SendClientMessage(i, color1, text);
    }
    else
    {
   SendClientMessage(i, color2, text);
    }
   }
   return 1;
}

 

Share this post


Link to post
  • 0

Тему можно закрывать, нашёл свои ошибки и исправил их. Спасибо.

Share this post


Link to post
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By def
      arizona.pwn(23374) : error 012: invalid function call, not a valid address
      arizona.pwn(23374) : error 001: expected token: ";", but found ")"
      arizona.pwn(23374) : error 029: invalid expression, assumed zero
      arizona.pwn(23374) : fatal error 107: too many error messages on one line
      жалуется на данную строчку:
       
      %s{cccccc}Для продолжения нажмите 'Далее'",PN(playerid),playerid,ItemsInfo[itemid][ItemName2],hours,cost*hours,Inventory[playerid][2][slot], AksColorName(Inventory[playerid][4][slot]), Inventory[playerid][5][slot] ? GetNameStripe(Inventory[playerid][5][slot]) : "");