07.01.2012, 17:21
pawn Код:
if (strcmp(cmd, "/daradmin", true, 10) == 0)
{
if(PlayerInfo[playerid][Admin] > 4)
{
new plid;
new niveladmin[20];
tmp = strtok(cmdtext, idx);
plid = strval(tmp);
niveladmin = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, AVISOADM, "[ERRO] Use: /daradmin [id] [nivel]");
return 1;
}
if(IsPlayerConnected(plid) == 0)
{
SendClientMessage(playerid, AVISOADM, "[ERRO] Player OFF-LINE");
return 1;
}
GetPlayerName(strval(tmp), pName, sizeof(pName));
GetPlayerName(playerid, adm, sizeof(adm));
format(stringa, sizeof(stringa), "[ADMCMD]:O admin %s lhe deu adm nivel:%s", adm,niveladmin);
SendClientMessage(plid, COLOR_DBLUE, stringa);
format(stringa, sizeof(stringa), "[ADMCMD]:Vocк deu admin para %s nivel:%s", adm,niveladmin);
SendClientMessage(playerid, COLOR_DBLUE, stringa);
PlayerInfo[plid][Admin] = niveladmin; //linha do erro u.u' 909
}
return 1;
}
Код:
C:\Users\a\Desktop\Drift BSC\gamemodes\BSCdrift.pwn(909) : error 006: must be assigned to an array Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
REP+ pra quem ajudar