22.10.2012, 20:03
In this code:
I get this error:
This is the line error:
pawn Код:
CMD:admins(playerid, params[])
{
new online, string[128], file[32];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 5)
{
foreach(Player, i)
{
if(PlayerInfo[i][pAdmin] && aDuty[i])
{
online ++;
}
}
format(string, sizeof(string), "<> --- Administrators --- <>");
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
foreach(Player, i)
{
if(PlayerInfo[i][pAdmin] && aDuty[i])
{
format(string, sizeof(string), "- %s %s", RPALN(i), RPN(i));
SendClientMessage(playerid, COLOR_IRC, string);
}
}
}
else
{
foreach(Player, i)
{
if(PlayerInfo[i][pAdmin])
{
online ++;
}
}
format(string, sizeof(string), "<> --- Administrators --- <>");
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
foreach(Player, i)
{
if(PlayerInfo[i][pAdmin])
{
if(!aDuty[i])
{
format(file, sizeof(file), "users/%s.ini",RPNU(i));
format(string, sizeof(string), "- %s %s", RPALN(i), RPN(i));
}
else
{
format(file, sizeof(file), "users/%s.ini",RPNU(i));
format(string, sizeof(string), "- %s %s", RPALN(i), RPN(i));
}
if(PlayerInfo[i][pGangMod]) strcat(string, " [Gang Mod]");
SendClientMessage(playerid, COLOR_IRC, string);
}
}
}
if(PlayerInfo[i][pHelper])
{
online ++;
}
format(string, sizeof(string), "<> --- Helpers --- <>");
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
foreach(Player, i)
{
if(PlayerInfo[i][pHelper])
{
format(string, sizeof(string), "- %s %s", RPHLN(i), RPN(i));
SendClientMessage(playerid, COLOR_IRC, string);
}
}
return 1;
}
Quote:
C:\Users\Fiore\Desktop\zGaming GM\zGaming RP\gamemodes\ZRP.pwn(8755) : error 017: undefined symbol "i" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |
Quote:
if(PlayerInfo[i][pHelper]) |