strings without a length
#1

I start my server and i get this in my server log.txt and samp-server.exe

PLZ HELP!

[13:00:36] sscanf warning: Strings without a length are deprecated, please add a destination size.
[13:00:40] sscanf warning: Strings without a length are deprecated, please add a destination size.
[13:00:43] sscanf warning: Strings without a length are deprecated, please add a destination size.
Reply
#2

Код:
new ADD_BRACKETS[50];
sscanf(params, "s[50]", ADD_BRACKETS)
Reply
#3

Quote:
Originally Posted by ******
And are we meant to guess your code?
Are we?
Reply
#4

Код:
if(sscanf(params,"s[128]",))
You should add a string lenght like that "s[128]"
Reply
#5

You should include the size of the string too.

For example:
pawn Код:
// THIS IS WRONG:
new id, reason[64];
if(sscanf(params, "rs", id, reason)) // return an error message about usage
pawn Код:
// THIS IS CORRECT:
new id, reason[64];
if(sscanf(params, "rs[64]", id, reason)) // return an error message about usage
Reply
#6

Show us the code of your String and we might able to help you.

Possibilities, you've not insert the proper string that was set or you've forgotten to add

Код:
if(sscanf(params, "s[50]", string))
The proper string length in sscanf
Reply
#7

solved, thanks konstantinos
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)