Arbitrary part in sscanf - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Arbitrary part in sscanf (
/showthread.php?tid=378074)
Arbitrary part in sscanf -
MarkoN - 16.09.2012
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 )
AW: Arbitrary part in sscanf -
Nero_3D - 16.09.2012
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
Re: Arbitrary part in sscanf -
MarkoN - 16.09.2012
thanks. i just have to capitalise the letter i want to make optional
Re: Arbitrary part in sscanf -
Seven_of_Nine - 16.09.2012
Set them a default value too.
("D(0.1)" for example)