[Help] +1 rep sscanf warning: No default value found
#1

Код:
	if(sscanf(params, "s[32]dD", choice, doorid, amount))
	{
		SendClientMessageEx(playerid, COLOR_GREY, "SUDUNG: /ddedit [name] [doorid] [amount]");
		SendClientMessageEx(playerid, COLOR_GREY, "Available names: Exterior, Interior, CustomInterior, CustomExterior, VIP");
		SendClientMessageEx(playerid, COLOR_GREY, "Family, Faction, Wanted, Admin, VehicleAble, Color, PickupModel, Delete");
		return 1;
	}
When i use this command, the text show up
Код:
[14:28:03] sscanf warning: No default value found.
Reply
#2

You have to give a default value to D, which will make "amount" optional, let's say we want "amount" to be 10 if not specified:
pawn Код:
if(sscanf(params, "s[32]dD", choice, doorid, amount))
to
pawn Код:
if(sscanf(params, "s[32]dD(10)", choice, doorid, amount))
Also, you need to have 50 posts to give reputation.
Reply
#3

Thanks, it work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)