PDA

View Full Version : sscanf ignore


iTorran
21/12/2011, 04:03 PM
When i load stuff from tables, i use this:

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?

gamer931215
21/12/2011, 05:06 PM
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:
http://forum.sa-mp.com/showthread.php?t=122983

Vince
21/12/2011, 06:52 PM
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.