Command error
#1

Recenlty i've created an command(NOT FINISHED) but they display this error in console :
Код:
[20:37:29] sscanf warning: Format specifier does not match parameter count.
Код:
CMD:medic(playerid, params[])
{
   	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
   	if(!IsAParamedic(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an medic.");	
	if(sscanf(params,"s[32]", params))
	{
	    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /medic [action]");
	    SendClientMessage(playerid, COLOR_GREY, "SERVICES: accept | cancel");
	    return 1;
	}
	if(!strcmp(params, "accept", true))
	{
	    new playerb, string[250];
	    if(sscanf(params, "uis[64]", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /medic accept [playerid]");		
	    if(PlayerInfo[playerb][pMedicRequest] == 0) return SendClientMessage(playerid, COLOR_GREY, "This men dosen't need your service.");
        format(string, sizeof(string), "%s has accepted your medic call.Please stay at your position.",NORPN(playerid));		
		SendClientMessage(playerb,COLOR_LIGHTGREEN,string);		
		SendClientMessage(playerb,COLOR_LIGHTGREEN,"If you don't medic anymore type /cancel medic.");				
		return 1;
	}
		if(!strcmp(params, "cancel", true))
	{		
        PlayerInfo[playerid][pMedicRequest] = 0;
		return 1;
	}
	return 1;
}
+REP FOR PERSON WHO HELP ME!
Reply


Messages In This Thread
Command error - by Rien - 02.01.2014, 18:29
Re: Command error - by xo - 02.01.2014, 18:36
Re: Command error - by Smileys - 02.01.2014, 18:40

Forum Jump:


Users browsing this thread: 2 Guest(s)