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



sscanf bug. - audriuxxx - 30.07.2013

Hi,

I think it's sscanf bug, or i don't know how to fix it:

I want to load some stuff from database, some strings and numbers like:

Код:
new GETSTRING[ 50 ];
new GETSTRING2[ 50 ];
new NUMBERS[ 2 ];
Код:
sscanf(savginstring,"p<|>s[50]ds[50]d", GETSTRING, NUMBERS[ 0 ], GETSTRING2,NUMBERS[ 1 ] );
And if string is a like "asdas asdasd asdasdsa", then in numbers some values go like a string, and it's get bugged...


Respuesta: sscanf bug. - JustBored - 30.07.2013

it's a MySQL database or SQLITE? or just an .ini file?


Re: sscanf bug. - audriuxxx - 30.07.2013

mysql database


Re: sscanf bug. - Konstantinos - 30.07.2013

pawn Код:
sscanf(savginstring,"p<|>s[50]ds[50]d", GETSTRING, NUMBERS[ 0 ], GETSTRING2,NUMBERS[ 1 ] );
This would work if the savingstring was:
pawn Код:
"SomethingHere|5|AnotherTextHere|6"