29.03.2011, 17:44
Hello, i need some help here. I am scripting a registration + admin system. Based on a tutorial by Snipa
I get this errors:
This is the command i get my errors on:
Line 689
Line 690
Line 693
I cant seem to fix this
Anyone knows?
Thanks, Alex
I get this errors:
Код:
(689) : error 017: undefined symbol "id" (690) : error 017: undefined symbol "id" (693) : error 017: undefined symbol "n" (693) : error 017: undefined symbol "n" (693) : error 029: invalid expression, assumed zero (693) : fatal error 107: too many error messages on one line
pawn Код:
CMD:ban(playerid,params[])
{
if(PInfo[playerid][Level] >=2 || IsPlayerAdmin(playerid))
new idn[MAX_PLAYER_NAME],reason[50], on[MAX_PLAYER_NAME], string[128], string2[128],file[128];
if(sscanf(params,"uz",idn, reason)) return SendClientMessage(playerid,RED,"Usage: /ban [id] [reason]");
if(PInfo[id][Level] > PInfo[playerid][Level]) SendClientMessage(playerid,RED,"ERROR: You cannot use this command on this administrator!");
else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid,RED,"ERROR: Player is not connected");
else
{
GetPlayerName(playerid,n,sizeof(n));
GetPlayerName(id,on,sizeof(on));
format(string,sizeof(string),"You have been banned by Administrator %s for %s",n, reason);
SendClientMessage(id,RED,string);
format(string2, sizeof(string2), "Administrator %s has banned %s for %s",n,on,reason);
SendClientMessageToAll(RED,string2);
TogglePlayerControllable(id, false);
BanEx(id,reason);
}
}
else return SendClientMessage(playerid,RED,"You are not a high enough level to use this command!");
return 1;
}
Код:
if(PInfo[id][Level] > PInfo[playerid][Level]) SendClientMessage(playerid,RED,"ERROR: You cannot use this command on this administrator!");
Код:
else
Код:
GetPlayerName(id,on,sizeof(on));
Anyone knows?
Thanks, Alex