Another small help i worked on freeze and i got a line have a lot of errors
I will send the full code
Код:
CMD:freeze(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] >= 5);
{
new Target;
if(sscanf(params, "u", Target)) SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /freeze [playerid]");
if(!IsPlayerConnected(Target))
return SendClientMessage(playerid, COLOR_GREY, "ERROR:Player is not connected!");
if(!sscanf(params, "u", Target))
{
if(Target == playerid) return SendClientMessage(playerid, COLOR_RED, "ERROR: Cant perform this command on yourself!" );
if(PlayerInfo[Target][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid,red,"ERROR: You cant perform this on Admins that are higher than your level!");
new tname[MAX_PLAYER_NAME];
GetPlayerName(Target,tname,sizeof(tname));
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
new tstring[128];
new pstring[128];
new astring[128];
format(tstring,sizeof(tstring),"You have been frozen by administrator %s! You cant move!",pname);
format(pstring,sizeof(pstring),"You have frozen player %s(%d)!",tname,Target);
format(astring,sizeof(astring),"Administrator %s has frozen %s!",pname,tname);
SendClientMessage(Target,COLOR_GOLD,tstring);
SendClientMessage(playerid,TEAM_GROVE_COLOR,pstring);
SendClientMessageToAll(COLOR_LIGHTBLUE,astring);
TogglePlayerControllable(Target,0);
PlayerInfo[Target][Frozen] = 1;
}
}
else return SendClientMessage(playerid,COLOR_RED,"ERROR: You must be level 5 to use this command!");
return 1;
}
Error code
Код:
D:\My server\gamemodes\TDM_Script.pwn(1439) : error 001: expected token: ")", but found "["
D:\My server\gamemodes\TDM_Script.pwn(1439) : error 029: invalid expression, assumed zero
D:\My server\gamemodes\TDM_Script.pwn(1439) : warning 215: expression has no effect
D:\My server\gamemodes\TDM_Script.pwn(1439) : error 001: expected token: ";", but found "]"
D:\My server\gamemodes\TDM_Script.pwn(1439) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
The Line that have the errors
Код:
if(PlayerInfo[playerid][pAdmin] >= 5);