SSCANF WARNING - 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 WARNING (
/showthread.php?tid=632832)
SSCANF WARNING -
itachi - 20.04.2017
If I start my server,server.log send this :
Код:
[08:31:48] sscanf warning: 'z' is deprecated, consider using 'S' instead.
[08:31:48] sscanf warning: No default value found.
[08:31:48] sscanf warning: Format specifier does not match parameter count.
[08:31:50] sscanf warning: 'z' is deprecated, consider using 'S' instead.
[08:31:50] sscanf warning: No default value found.
[08:31:50] sscanf warning: Strings without a length are deprecated, please add a destination size.
Re: SSCANF WARNING -
X337 - 20.04.2017
You are using 'z' specifier for sscanf in your codes which is deprecated, replace them with 'S' if you have a default value, otherwise use 's' and also provide string destination length.
Re: SSCANF WARNING -
AjaxM - 20.04.2017
sscanf warning: 'z' is deprecated, consider using 'S' instead.
You are using 'z' somewhere in the script instead of using the specifier 's'.
Example:
PHP код:
if(sscanf(params, "z", ...))
Use 'S' instead of 'z'.
sscanf warning: Strings without a length are deprecated, please add a destination size.
Example:
PHP код:
new eg[5];
if(sscanf(params, "s", eg))
Should be
PHP код:
new eg[5];
if(sscanf(params, "s[5]", eg))
This can even cause your server to crash.
Re: SSCANF WARNING -
iLearner - 20.04.2017
Quote:
Originally Posted by AjaxM
sscanf warning: 'z' is deprecated, consider using 'S' instead.
You are using 'z' somewhere in the script instead of using the specifier 's'.
Example:
PHP код:
if(sscanf(params, "z", ...))
Use 'S' instead of 'z'.
sscanf warning: Strings without a length are deprecated, please add a destination size.
Example:
PHP код:
new eg[5];
if(sscanf(params, "s", eg))
Should be
PHP код:
new eg[5];
if(sscanf(params, "s[5]", eg))
This can even cause your server to crash.
|
let's not exaggerate.