sscanf bug.
#1

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...
Reply
#2

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

mysql database
Reply
#4

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"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)