30.06.2016, 00:13
Update: I think I'm getting somewhere, I've got the errors down a little but not sure if I'm going the right way?
That's what I've changed now and it's returning this error:
Код:
cmd(admins playerid, params[]) { if(IsPlayerConnected(playerid)) { SendClientMessage(playerid, COLOR_ADMIN, "Online Staff Members:"); new count; new ID; new admtext[64]; for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { new sendername[MAX_PLAYER_NAME]; switch(PlayerInfo[i][pAdminLevel]) case 1: format(admtext, 64, "{10F441}Beta Tester"); case 2: format(admtext, 64, "{10F441}Moderator"); case 3: format(admtext, 64, "{33AA33}Administrator"); case 4: format(admtext, 64, "{FF0000}Senior Administrator"); case 1337: format(admtext, 64, "{FF0000}Head Administrator"); default: continue; } GetPlayerName(i, sendername, sizeof(sendername)); new tstr[128]; format(tstr, 128, "%s(%d) - %s", sendername, ID, admtext); SendClientMessage(playerid, -1, tstr); format(admtext, 64, ""); count++; } if(count == 0) { SendClientMessage(playerid, COLOR_ERROR, "No online administrators found."); return 1; } } } return 1; }
Код:
C:\Users\Tom\Desktop\SAMP Server\gamemodes\newgm.pwn(373) : error 001: expected token: "{", but found "case" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.