Arbitrary part in sscanf
#1

I know i saw somewhere but i don't know where, to make a part in sscanf arbitrary, for an example
pawn Код:
if(sscanf(params, "ddd", id, col1, col2)) return SendClientMessage(playerid, COLOR_RED, "Error : "COL_WHITE"Uncorrect format. /veh [VehicleID][col1][col2]. Use wiki.sa-mp.com/wiki/Vehicles:All");
to make the colors arbitrary. So if the player doesnt input the colors it sets to default ( 0 - black )
Reply
#2

Just read again the sscanf topic, thats what I do if I forgot something about it
Also I couldnt explain it better than ******, look for the section Optional specifiers
Reply
#3

thanks. i just have to capitalise the letter i want to make optional
Reply
#4

Set them a default value too.
("D(0.1)" for example)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)