Someone halp?
#1

pawn Код:
201 CMD:admins(playerid, params[])
202 {
203         new count=0;
204     SendClientMessage(playerid, 0x800000AA, "======= XFreedom - Adminstrator List =======");
205     for(new i=0; i<MAX_PLAYERS; i++)
206 }
207     if(IsPlayerConnected(i))
208 {
209     if(pInfo[i][Level] > 1)
210     {
211     new aname[MAX_PLAYER_NAME], string[128];
212     GetPlayerName(i, aname, sizeof(aname));
213     format(string, sizeof(string), "Admin: %s [Level %d]", aname, pInfo[i][Level]);
214     SendClientMessage(playerid, 0x800000AA, string);
215     count++;
216     }
217 }
218 }
219 return 1;
pawn Код:
C:\Users\Administrator\Desktop\o\filterscripts\Login.pwn(206) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Desktop\o\filterscripts\Login.pwn(206 -- 207) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\o\filterscripts\Login.pwn(207) : error 001: expected token: ";", but found "if"
C:\Users\Administrator\Desktop\o\filterscripts\Login.pwn(207) : error 017: undefined symbol "i"
C:\Users\Administrator\Desktop\o\filterscripts\Login.pwn(207) : 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.
How to fix the errors.
Reply
#2

pawn Код:
201 CMD:admins(playerid, params[])
202 {
203     new count=0;
204     SendClientMessage(playerid, 0x800000AA, "======= XFreedom - Adminstrator List =======");
205     for(new i=0; i<MAX_PLAYERS; i++)
206     {
207         if(IsPlayerConnected(i))
208         {
209             if(pInfo[i][Level] > 1)
210             {
211             new aname[MAX_PLAYER_NAME], string[128];
212             GetPlayerName(i, aname, sizeof(aname));
213             format(string, sizeof(string), "Admin: %s [Level %d]", aname, pInfo[i][Level]);
214             SendClientMessage(playerid, 0x800000AA, string);
215             count++;
216             }
217         }
218     }
219 return 1;
      }
Reply
#3

pawn Код:
for(new i=0; i<MAX_PLAYERS; i++)
 }
    if(IsPlayerConnected(i))
to
pawn Код:
for(new i=0; i<MAX_PLAYERS; i++)
    {
         if(IsPlayerConnected(i))
Reply
#4

Thanks all for the help +Rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)