SA-MP Forums Archive
Sscanf question - 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 question (/showthread.php?tid=327862)



Sscanf question - Tanush123 - 22.03.2012

Well today i randomly go on my console and found this
Код:
[16:26:03] sscanf warning: Missing length end.
what does this means?


Re: Sscanf question - Skribblez - 22.03.2012

doesn't show line where the error is?


Re: Sscanf question - T0pAz - 22.03.2012

Which sscanf version are you using?


Edit: The problem is that the end of the string was reached before the valid end of the length. Make sure your length is valid.


Re: Sscanf question - Tanush123 - 22.03.2012

Well i use the newest one, and i also got this
Код:
[16:54:02] sscanf warning: Strings without a length are deprecated, please add a destination size.
with this
pawn Код:
if(sscanf(params,"s",name))return SCM(playerid,grey,"USAGE: /setname [new name]");



Re: Sscanf question - T0pAz - 22.03.2012

pawn Код:
if(sscanf(params,"s[24]",name))return SCM(playerid,grey,"USAGE: /setname [new name]");
And also, make a restriction that people cannot type more than 24 characters as the player name using strlen.