16.01.2014, 17:48
pawn Код:
CMD:donators(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 5)
{
SendClientMessage(playerid, COLOR_NEWS, "Donators Online:");
new
iCount,
szMessage[128];
foreach(new i : Player) //This line
{
if(PlayerInfo[i][pDonator] == 1)
{
format(szMessage, sizeof(szMessage), "(Ruby) ID: %d | Name: %s | Level: %d | Ping: %d", i, GetPlayerNameEx(i), PlayerInfo[i][pLevel], GetPlayerPing(i));
SendClientMessage(playerid, COLOR_WHITE, szMessage);
iCount++;
}
else if(PlayerInfo[i][pDonator] == 2)
{
format(szMessage, sizeof(szMessage), "(Sapphire) ID: %d | Name: %s | Level: %d | Ping: %d", i, GetPlayerNameEx(i), PlayerInfo[i][pLevel], GetPlayerPing(i));
SendClientMessage(playerid, COLOR_WHITE, szMessage);
iCount++;
}
else if(PlayerInfo[i][pDonator] == 3)
{
format(szMessage, sizeof(szMessage), "(Diamond) ID: %d | Name: %s | Level: %d | Ping: %d", i, GetPlayerNameEx(i), PlayerInfo[i][pLevel], GetPlayerPing(i));
SendClientMessage(playerid, COLOR_WHITE, szMessage);
iCount++;
}
}
if(iCount == 0)
return SendClientMessage(playerid, COLOR_GREY, "There aren't any donators online right now.");
}
return true;
}
PHP код:
C:\Ma Stuff is Here\FUCKU\gamemodes\LYL.pwn(11846) : error 017: undefined symbol "foreach"
C:\Ma Stuff is Here\FUCKU\gamemodes\LYL.pwn(11846) : error 029: invalid expression, assumed zero
C:\Ma Stuff is Here\FUCKU\gamemodes\LYL.pwn(11846) : error 017: undefined symbol "i"
C:\Ma Stuff is Here\FUCKU\gamemodes\LYL.pwn(11846) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.