04.07.2014, 13:42
(
Последний раз редактировалось SHE790; 04.07.2014 в 15:07.
)
Hi all i have a problem with this jail cmd
Код:
CMD:jail(playerid, params[]) { if(P_Data[playerid][pAdmin] == 1) return SendClientMessage(playerid,COL_RED,"You need to be admin"); new string[256],reason[100],pplayerid,time; if(sscanf(params,"uis[50]", pplayerid,reason)) return SendClientMessage(playerid,-1,"USAGE:/jail [playerid] [time] [reason]"); if(pplayerid==INVALID_PLAYER_ID) return SendClientMessage(playerid,COL_RED,"Player Id Not Connected"); if(P_Data[playerid][pAdmin] == 1) return SendClientMessage(playerid,COL_RED,"You CAN'T jail Admins"); format(string,sizeof(string),"Admin %s Has Jailed %s Reason: %s",GetName(playerid),GetName(pplayerid),reason); SendClientMessageToAll(-1,string); Jailed(pplayerid); SetPlayerInterior(pplayerid, 6); return 1; }
Код:
Errors: C:\Users\Golchin Rayaneh\Desktop\ServeR\filterscripts\ShAdmin.pwn(420) : error 035: argument type mismatch (argument 2) C:\Users\Golchin Rayaneh\Desktop\ServeR\filterscripts\ShAdmin.pwn(424) : error 035: argument type mismatch (argument 2) C:\Users\Golchin Rayaneh\Desktop\ServeR\filterscripts\ShAdmin.pwn(425) : error 035: argument type mismatch (argument 2) C:\Users\Golchin Rayaneh\Desktop\ServeR\filterscripts\ShAdmin.pwn(428) : error 012: invalid function call, not a valid address C:\Users\Golchin Rayaneh\Desktop\ServeR\filterscripts\ShAdmin.pwn(428) : warning 215: expression has no effect C:\Users\Golchin Rayaneh\Desktop\ServeR\filterscripts\ShAdmin.pwn(428) : error 001: expected token: ";", but found ")" C:\Users\Golchin Rayaneh\Desktop\ServeR\filterscripts\ShAdmin.pwn(428) : error 029: invalid expression, assumed zero C:\Users\Golchin Rayaneh\Desktop\ServeR\filterscripts\ShAdmin.pwn(428) : fatal error 107: too many error messages on one line
Код:
Error Lines: (420): if(P_Data[playerid][pAdmin] == 1) return SendClientMessage(playerid,COL_RED,"You need to be admin"); (424): if(pplayerid==INVALID_PLAYER_ID) return SendClientMessage(playerid,COL_RED,"Player Id Not Connected"); (425): if(P_Data[playerid][pAdmin] == 1) return SendClientMessage(playerid,COL_RED,"You CAN'T jail Admins"); (428): Jailed(pplayerid);