strlen checking inputtext? [rep++] - 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: strlen checking inputtext? [rep++] (
/showthread.php?tid=304504)
strlen checking inputtext? [rep++] -
Hoborific - 18.12.2011
pawn Код:
if(strlen(inputtext) >= 24 || =< 3)
Alright so that's my newb attempt at this, seemingly i've never done it before I think I gave it a pretty alright go, shame it didn't work...
Nevermind, think I got it.
pawn Код:
if(strlen(inputtext) > 24 || strlen(inputtext) < 3)
Re: strlen checking inputtext? [rep++] -
Norck - 18.12.2011
You also can do the same with this code:
pawn Код:
if(!(3 < strlen(inputtext) < 24))
It's a bit faster, because you call strlen function only once.