13.04.2015, 15:43
So, the error "undefined symbol" means you use a function or variable that you haven't declared.
Here, you forgot to declare the variable "sendername". You need to declare it before use it.
I advise you not declare it in your loop as did my upstairs neighbor.
Here, you forgot to declare the variable "sendername". You need to declare it before use it.
I advise you not declare it in your loop as did my upstairs neighbor.
PHP код:
if(strcmp(string, "/admins", true) == 0)
{
if(!IsPlayerConnected(playerid)) return 1;
SendClientMessage(playerid, COLOR_LBLUE, "Admins Online:");
new
sendername[MAX_PLAYER_NAME+1];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if(adlvl[playerid] > 0) continue;
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 256, "[Level:%d] %s (ID:%d)", adlvl, sendername, playerid);
SendClientMessage(playerid, COLOR_GREEN, string);
}
return 1;
}