Detecting numbers?
#1

I'm making a registration system and I wanted to know how you'd detect if someone entered numbers in the dialog?

Thanks.
Reply
#2

Check if the inputtext is numeric with such a function
pawn Код:
stock IsNumeric(const string[]) {
    for(new i = strlen(string); i-- >= 0; ) {
        if(!('0' <= string[i] <= '9')) {
            return false;
        }
    }
    return true;
}
Reply
#3

Thanks!
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)