04.03.2014, 08:46
Hello guys, I created this command to settarsi admin in my gamemode but it gives me the following errors!
ERROR:
PHP код:
if (strcmp("/settaadmin", cmdtext, true, 10) == 0)
{
new id;
if(pInfo[playerid][Admin] >= 5 || IsPlayerAdmin(playerid))
{
if(sscanf(params,"ui", id, level))
{
return SendClientMessage(playerid, LBLUE, "Usage: /setlevel (playerid) (level)") &&
SendClientMessage(playerid, GREEN, "Function: Set a person a admin");
}
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, RED, "ERROR: That is a invalid player ID");
format(str, sizeof(str), "UPDATE `playerinfo` SET `Admin` = %d WHERE `User` = '%s'", level, pName(id));
format(str, sizeof(str), "|- Administrator %s has made %s (%d) admin level %d -|", pName(playerid), pName(id), id, level);
PlayerInfo[playerid][Admin] = level;
}
else SendClientMessage(playerid, RED, "ERROR: You are not a level 5 admin!");
return 1;
}
ERROR:
PHP код:
C:\Users\Fabio Falcone\Desktop\OklaHoma City\gamemodes\gm.pwn(198) : error 017: undefined symbol "params"
C:\Users\Fabio Falcone\Desktop\OklaHoma City\gamemodes\gm.pwn(204) : error 017: undefined symbol "str"
C:\Users\Fabio Falcone\Desktop\OklaHoma City\gamemodes\gm.pwn(204) : error 017: undefined symbol "str"
C:\Users\Fabio Falcone\Desktop\OklaHoma City\gamemodes\gm.pwn(204) : error 029: invalid expression, assumed zero
C:\Users\Fabio Falcone\Desktop\OklaHoma City\gamemodes\gm.pwn(204) : fatal error 107: too many error messages on one line