Problem with zcmd
#1

Hello, as I've started scripting again I have had a few problems but I need to know what's causing and how I fix this. When I use the command /kick a message pops up in the server log saying: "sscanf warning: Strings without a length are deprecated, please add a destination size."



This is the code:

Код:
CMD:kick(playerid, params[])
{
       new id, reason[128], string[128], playername[MAX_PLAYER_NAME], playid[MAX_PLAYER_NAME];

       if(sscanf(params, "us", id, reason)){SendClientMessage(playerid, COLOR_RED, "Correct usage: /kick [playerid] [Reason]");}
	   else if(!IsPlayerConnected(id)){SendClientMessage(playerid, COLOR_RED, "The selected player is not connected.");}
	   else if(PlayerInfo[id][pAdmin] > 0) {SendClientMessage(playerid, COLOR_RED, "The selected player is an admin.");}
       else{
	   GetPlayerName(id, playid, sizeof(playid));
       GetPlayerName(playerid, playername, sizeof(playername));
	   format(string, sizeof(string),"[SERVER] %s has been kicked by %s. [Reason]: %s", playid, playername, reason[127]);
	   SendClientMessageToAll(COLOR_WHITE, string);
	   Kick(id);
	   }
	   return 1;
	   }
Reply


Messages In This Thread
Problem with zcmd - by Mystique - 20.02.2013, 17:31
Re: Problem with zcmd - by JamesS - 20.02.2013, 17:33
Re: Problem with zcmd - by ryansheilds - 20.02.2013, 17:34
Re: Problem with zcmd - by batonsa - 20.02.2013, 17:34
Re: Problem with zcmd - by Mystique - 20.02.2013, 17:37
Re: Problem with zcmd - by batonsa - 20.02.2013, 17:38
Re: Problem with zcmd - by ryansheilds - 20.02.2013, 17:40
Re: Problem with zcmd - by DaRk_RaiN - 20.02.2013, 17:45

Forum Jump:


Users browsing this thread: 1 Guest(s)