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



sscanf ignore - iTorran - 21.12.2011

When i load stuff from tables, i use this:

pawn Код:
sscanf(query, "e<p<|>s[24]s[129]s[16]iii>", PlayerInfo[playerid]);
That gets the rows in that order from MySQL and puts them in PlayerInfo[playerid].
Well, i want to load only specific rows. Is there anyway to do this with sscanf?
Other ways i try seem to crash, what i basically want to do is make it ignore some things, e.g.:

"e<p<|>s[24]s[129]iffff>"

I'd want it to save the 2 strings, the floats, but ignore the integer and not save it.
Any way to do this?


Re: sscanf ignore - gamer931215 - 21.12.2011

It depends on the plugin you are using, some mysql plugins have functions like "mysql_fetch_field", which allows you to "fetch" only specefic fields.

Strickenkid's plugin:
https://sampforum.blast.hk/showthread.php?tid=122983


Re: sscanf ignore - Vince - 21.12.2011

I think that if you wrap the integer in the "silent mode" (using {i}) it might work. Sscanf will still verify the data integrity, but will not store it.