IsNumeric
#1

Hey guys,

Can anyone get me the IsNumeric function/stock (however you call it)?
I've already got this one:
pawn Код:
IsNumeric(const string[])
{
        for (new i = 0, j = strlen(string); i < j; i++)
        {
                if (string[i] > '9' || string[i] < '0') return 0;
        }
        return 1;
}
But someone told me in a chat that this wasn't a good one, and probably wouldnt work that good. Trying to check if an inputtext contains numbers, and if not it gives an error message

~Wesley
Reply
#2

This IsNumeric() function will work just fine.
Reply
#3

Hmm okay, then i'll just use this one
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)