SA-MP Forums Archive
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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: sscanf warning (/showthread.php?tid=154341)



sscanf warning - [L3th4l] - 13.06.2010

I get this warning after adding a car saving system in my gamemode:

sscanf warning: Strings without a length are deprecated, please add a destination size.


Re: sscanf warning - Nero_3D - 13.06.2010

You should read the sscanf 2.0 topic because it looks like that you are using the plugin

you just need to add the size behind s

Example
pawn Код:
new string[32], number;
sscanf(text, "s[32]i", string, number);



Re: sscanf warning - [L3th4l] - 14.06.2010

I figured its not my script, but a filterscript i was trying out..

Here is how it looks where i think its giving the problem:

Код:
if (!sscanf(buffer_str, BUFFER_READ_FORMAT , BUFFER_PARAMS(point)))
And

Код:
else if (!sscanf(buffer_str, OLD_BUF_READ_FORMAT, OLD_BUF_PARAMS(point)))
---------------------------^ I would like to know how to include the sizes there

I think this is a way to fix this one also:

Код:
if (sscanf(params, "ds["#MAX_POINT_NAME_LENGHT"]", para, name))