24.01.2013, 13:58
man i have included this
#include <foreach>
and this is my command
and showing me this error please help me
please help me the line
#include <foreach>
and this is my command
Код:
CMD:admins(playerid,params[]) { new Count = 0; new string[100], n[MAX_PLAYER_NAME]; foreach(new i : Player) { if(PlayerInfo[i][Level] > 0) { GetPlayerName(i,n,sizeof(n)); format(string,sizeof(string),"Level %d: %s (ID: %d) - %s", PlayerInfo[i][Level], n, i, GetRankFromLevel(i)); ShowPlayerDialog(playerid, 7, DIALOG_STYLE_MSGBOX, "Online Admins...", string, "ok", ""); Count++; } } if(Count == 0) { ShowPlayerDialog(playerid, 7, DIALOG_STYLE_MSGBOX,"Online Admins...", "There Are No Administrators Online.", "ok", ""); } return 1; }
Код:
C:\Users\AyushSekhari\Desktop\RevolutionX sa-mp server\gamemodes\gamemode\RGXTDM.pwn(31208) : error 017: undefined symbol "foreach" C:\Users\AyushSekhari\Desktop\RevolutionX sa-mp server\gamemodes\gamemode\RGXTDM.pwn(31208) : error 029: invalid expression, assumed zero C:\Users\AyushSekhari\Desktop\RevolutionX sa-mp server\gamemodes\gamemode\RGXTDM.pwn(31208) : error 017: undefined symbol "i" C:\Users\AyushSekhari\Desktop\RevolutionX sa-mp server\gamemodes\gamemode\RGXTDM.pwn(31208) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Код:
foreach(new i : Player)