[REP++] Check if string is number or not number - 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: [REP++] Check if string is number or not number (
/showthread.php?tid=601223)
[REP++] Check if string is number or not number -
buburuzu19 - 18.02.2016
My problem is the next. I want the easiest way for detect a string if contains only numbers or numbers and characters or only characters.
What can i use?
Please don't reply me with IsNumeric stock because this make server crash.
Re: [REP++] Check if string is number or not number -
Vince - 18.02.2016
I'm gonna say IsNumeric and if it makes your server crash you're using it wrong. Alternatively you may use sscanf with quiet specifiers.
PHP код:
IsNumeric(string[]) return !sscanf(string, "{d}");