SA-MP Forums Archive
A error? - 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: A error? (/showthread.php?tid=510242)



A error? - Tuntun - 30.04.2014

Suddenly my server have been stop. And in server log i got this error:
Код:
[12:58:40] sscanf warning: Strings without a length are deprecated, please add a destination size.
What to do about this? I had never error like this.


Re: A error? - PrivatioBoni - 30.04.2014

You know the sscanf line?

Well, you need to add the length of the string.

So, like:
pawn Код:
if(sscanf(params,"us[28]",ID,reason))
[28] being the size of the string.


Re: A error? - Konstantinos - 30.04.2014

Using "s" specifier in sscanf without a length will give that warning. An example:
pawn Код:
// that's the WRONG way:
if (sscanf(params, "rs", id, new_name)) ...
and

pawn Код:
// that's the CORRECT way:
if (sscanf(params, "rs[21]", id, new_name)) ...



Re: A error? - Tuntun - 01.05.2014

Umm... but where can i find this line?


Respuesta: Re: A error? - Swedky - 01.05.2014

Quote:
Originally Posted by Tuntun
Посмотреть сообщение
Umm... but where can i find this line?
-> Search text -> if(sscanf

And search...