Question about sscanf - 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: Question about sscanf (
/showthread.php?tid=649599)
Question about sscanf -
FelixAquero - 11.02.2018
Hello. I have this code:
Код:
sscanf(params, "p<.>iiii", params[0], params[1], params[2], params[3])
How to set the maximum length of integer? For example, 3, so that 111.111.111.111 is allowed, and 111111.11111.11.111 - no?
Re: Question about sscanf -
Mugala - 11.02.2018
if(params[0] > 111 && params[0] < 1) return script;
you can do this to all of these params (params[0],params[1],params[2],params[3])
Re: Question about sscanf -
FelixAquero - 11.02.2018
Exactly, thanks