strings without a length - 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: strings without a length (
/showthread.php?tid=469483)
strings without a length -
xyzcod2 - 13.10.2013
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.
Re: strings without a length -
detter - 13.10.2013
Код:
new ADD_BRACKETS[50];
sscanf(params, "s[50]", ADD_BRACKETS)
Re: strings without a length -
Twizted - 13.10.2013
Quote:
Originally Posted by ******
And are we meant to guess your code?
|
Are we?
Re: strings without a length -
edzis84 - 13.10.2013
Код:
if(sscanf(params,"s[128]",))
You should add a string lenght like that "s[128]"
Re: strings without a length -
Konstantinos - 13.10.2013
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
Re: strings without a length -
Zex Tan - 13.10.2013
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
Re: strings without a length -
xyzcod2 - 13.10.2013
solved, thanks konstantinos