[HELP]sscanf warning: Format specifier does not match parameter count.
#1

if(mysql_fetch_row(lajn)) sscanf(lajn, "p<|>is[24]s[24]s[64]s[32]s[16]", ajdi, banovani, admin, rizon, dejt);
mysql_free_result();
whats wrong ?
Reply
#2

Quote:
Originally Posted by Nedda
Посмотреть сообщение
if(mysql_fetch_row(lajn)) sscanf(lajn, "p<|>is[24]s[24]s[64]s[32]s[16]", ajdi, banovani, admin, rizon, dejt);
mysql_free_result();
whats wrong ?
There is 'i' specifier mentioned after p<|>. It must be related to playerid I believe?

EDIT: Check Kostas reply.
Reply
#3

"is[24]s[24]s[64]s[32]s[16]" -> 6 specifiers.

ajdi, banovani, admin, rizon, dejt -> 5 parameters.

You forgot 1 parameter.
Reply
#4

Nvm look above i was too late.
Reply
#5

http://i.imgur.com/ivGrCjO.png hmm 5 parameters.
Reply
#6

I fix this .. but i have other problem
sscanf warning: String buffer overflow. wtf ?
Reply
#7

The name on the parameters don't help us that much to understand what is about.

According to the picture above, it'd be: "p<|>s[24]s[24]s[64]s[32]i" and the parameters: name, admin, reason, date, id.

EDIT: That means that the lenght of the string is greater than the one which specified. For example, you say "s[24]" and that can get up to 23 characters. Any data with a greater lenght such as 40 (an example) will cause sscanf warning: String buffer overflow.
Reply
#8

Thanks brooo !!!! Lav ju so mac ))))) i fix problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)