SA-MP Forums Archive
sscanf problem - 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: sscanf problem (/showthread.php?tid=363342)



sscanf problem - Universal - 27.07.2012

Hi guys, my console outputs the following error:
Код:
sscanf warning: Format specifier does not match parameter count.
And I figured out its being caused by this piece of code:
pawn Код:
sscanf("0 -1 0 0 0 0 0 0 0 0 0.0 0.0 0.0 0.0 0 0 0 0 -1 0 0 0 0 0", vehicleInfo[id]);
So basically what Im trying to do is set these values to the enum (null'ing the vehicle enum in the other words) and somewhy Im getting this error. Wheres the problem guys? Thanks for any help!


Re: sscanf problem - Misiur - 27.07.2012

Are you using sscanf 2.6 and vehicleInfo[id] is the enum?

If yes:
pawn Код:
sscanf("0 -1 0 0 0 0 0 0 0 0 0.0 0.0 0.0 0.0 0 0 0 0 -1 0 0 0 0 0", "e<iiiiiiiiiiffffiiiiiiiiii>", vehicleInfo[id]);
Count the "i"'s


Re: sscanf problem - Universal - 27.07.2012

Hey thanks man! Funny thing is that I tried doing this by myself, but had the same error. Anyway, thanks!