Getting error..
#1

Code:
pawn Код:
CMD:admins(playerid)
{
    new string[128];
    SendClientMessage(playerid,COLOR_GGREEN,"---------ONLINE ADMINS---------");
    for(new i = 0; if < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][pAdmin] > 0)
        {
            format(string,sizeof(string), "%s - Level %d admin", GetPlayerNameEx(i), PlayerInfo[i][pAdmin]);
            SendClientMessageToAll(COLOR_GGREEN, string);
        }
    }
    return 1;
}
Error:
pawn Код:
(825) : error 029: invalid expression, assumed zero
Line 825:
pawn Код:
for(new i = 0; if < MAX_PLAYERS; i++)
Reply
#2

Quote:
Originally Posted by Audi_Quattrix
Посмотреть сообщение
pawn Код:
for(new i = 0; if < MAX_PLAYERS; i++)
It has to be:

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
You actually create a variable i, so the condition must be based around that variable and not an if-clause.

Regards.
Reply
#3

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)