14.08.2013, 15:15
Hello, i have 2 errors in my command and i don't know how to fix it, please help me:
number of arguments does not match definition at line: "BanPlayer(targetid,reason,PlayerName(playerid),to taltime);"
warning 204: symbol is assigned a value that is never used: "totaltime" at line: "new totaltime = gettime()+86400*days;"
Код:
CMD:timeban(playerid,params[]) { new targetid,days,reason[105],string[256]; if(sscanf(params, "uis[105]", targetid,days,reason)) return SendClientMessage(playerid,-1,""chat" /timeban [playerid] [day] [reason]"); if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online."); format(string, sizeof(string),""chat""COL_RED" %s %s has banned %s [Reason: %s]",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid),days,reason); SendClientMessageToAll(-1,string); new totaltime = gettime()+86400*days; BanPlayer(targetid,reason,PlayerName(playerid),totaltime); } return 1; }
warning 204: symbol is assigned a value that is never used: "totaltime" at line: "new totaltime = gettime()+86400*days;"