Dialog input trouble
#1

How can I check if the inputtext in dialog is a numeric value (integer)?
Reply
#2

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) {
..
}
Reply
#3

Thank you, I will try it out. Repped.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)