Рекомендованные сообщения



3 posts in this topic

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

 

Сами ошибки:

 

 


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
Share on other sites

Начнём с того, что Вы в 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
Share on other sites

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

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.