SA-MP Forums Archive
sscanf string splitting bug. - 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 string splitting bug. (/showthread.php?tid=416055)



sscanf string splitting bug. - Kaaajmak - 15.02.2013

So, i've been trying to split a string read from a file.
The string is: "-1;-1;-1;-1;-1" ..
And i did: sscanf(string, "p<;>a<i>[5]", array);
And it outputs into the array: "-1 0 0 0 0"..
What am I doing wrong?


Re: sscanf string splitting bug. - Kaaajmak - 15.02.2013

UPDATE: Also, switching the string to "1;2;3;4;5" produces "0 0 0 0 0".


Re: sscanf string splitting bug. - mastermax7777 - 15.02.2013

probably cause its isnt updated with 0.3x.. i noticed this too scanf isnt working for me


Re: sscanf string splitting bug. - Kaaajmak - 15.02.2013

UPDATE: Reinstalled plugin, still the same


Re: sscanf string splitting bug. - Kaaajmak - 16.02.2013

Is there perhaps another way (not using sscanf, maybe explode?)


Re: sscanf string splitting bug. - Kaaajmak - 16.02.2013

*shameless self-bump*


Re: sscanf string splitting bug. - dusk - 16.02.2013

show your include. I had a problem like this for a couple of days.