View Single Post
Old 13/08/2017, 05:50 AM   #1
skiplovebra
Huge Clucker
 
Join Date: Sep 2015
Posts: 257
Reputation: 0
Default sscanf warning: Format specifier does not match parameter count.

help me please
Code:
CMD:batgiam(playerid, params[])
{
	if(!IsACop(playerid)) SendClientMessageEx(playerid, COLOR_GREY, "Ban khong phai la LEO faction. ");
	else if(!IsAtArrestPoint(playerid, 2)) SendClientMessageEx(playerid, COLOR_GREY, "Ban khong o diem bat giu tai DOC." );

	else
	{
   		new
     		moneys,
       		time,
			string[256];

        new suspect = GetClosestPlayer(playerid);
  		if(sscanf(params, "dddd", moneys, time)) SendClientMessageEx(playerid, COLOR_GREY, "SU DUNG: /batgiam [fine] [minutes]");
		else if(!(1 <= moneys <= 250000)) SendClientMessageEx(playerid, COLOR_GREY, "Phat tien ngoi tu khong duoi $1 va tren $250,000.");
		else if(!(1 <= time <= 70)) SendClientMessageEx(playerid, COLOR_GREY, "Thoi gian ngoi tu khong duoi 1 va tren 70 phut - co the dua nguoi do toi tu de co them thoi gian giam giu.");
		else if(!IsPlayerConnected(suspect)) SendClientMessageEx(playerid, COLOR_GREY, "nguoi choi khong hop le.");
		else if(!ProxDetectorS(5.0, playerid, suspect)) SendClientMessageEx(playerid, COLOR_GREY, "Ban phai o gan nghi pham.");
		else if(PlayerInfo[suspect][pWantedLevel] < 1 && PlayerInfo[playerid][pMember] != 12) SendClientMessageEx(playerid, COLOR_GREY, "Nguoi do phai co it nhat 1 cap do truy na");
		else {
			SetPVarInt(playerid, "Arrest_Price", moneys);
			SetPVarInt(playerid, "Arrest_Time", time);
			SetPVarInt(playerid, "Arrest_Suspect", suspect);
			SetPVarInt(playerid, "Arrest_Type", 2);
			format(string, sizeof(string), "Hay viet mot bao cao ngan gon ve viec bat giu %s va nhung hanh dong do.\n\nBao cao phai co it nhat 30 ki tu va nhieu nhat la 128 ki tu.", GetPlayerNameEx(suspect));
			ShowPlayerDialog(playerid, DIALOG_ARRESTREPORT, DIALOG_STYLE_INPUT, "Bao cao bat giu", string, "Gui di", "");
	    }
	}
	return 1;
}
skiplovebra is offline   Reply With Quote