04.07.2012, 17:45
I have:
And I get:
Line 895 is:
These errors occur when I put params[2] to display the kick reason.
Does anybody know what's going wrong?
pawn Код:
CMD:kick(playerid,params[])
{
if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,COLOR_RED,"You are not authorized to use that command.");//Checking if the player has admin level 3, if not it sends him a message.
new id;//Creating a variable to store the selected id;
if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /kick <id>");//Checking if the player has selected an id, other wise it sends him a message. We used the "u" specifier, because he can put a name or an id.
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"That player is not connected!");//Checking if the selected user is connected or not.
Kick(id);
SendClientMessageToAll(COLOR_LIGHTRED,"AdmCmd: %s has kicked %s, reason: %s", adminname, offender, params[2]);
return 1;
}
Quote:
Team Deathmatch\gamemodes\LTEST.pwn(895) : warning 202: number of arguments does not match definition Team Deathmatch\gamemodes\LTEST.pwn(895) : warning 202: number of arguments does not match definition Team Deathmatch\gamemodes\LTEST.pwn(895) : warning 202: number of arguments does not match definition |
pawn Код:
SendClientMessageToAll(COLOR_LIGHTRED,"AdmCmd: %s has kicked %s, reason: %s", adminname, offender, params[2]);
Does anybody know what's going wrong?