Dialog input trouble - 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: Dialog input trouble (
/showthread.php?tid=311690)
Dialog input trouble -
Gerira Gaijin - 17.01.2012
How can I check if the inputtext in dialog is a numeric value (integer)?
Re: Dialog input trouble -
2KY - 17.01.2012
IsNumeric.
pawn Код:
stock isnumeric(szStr[])//******
{
new
ch,
i;
while ((ch = szStr[i++])) if (ch < '0' || ch > '9') return 0;
return 1;
}
pawn Код:
if(IsNumeric(inputtext) {
..
}
Re: Dialog input trouble -
Gerira Gaijin - 17.01.2012
Thank you, I will try it out. Repped.