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


Messages In This Thread
IsNumeric - by Wesley221 - 18.06.2011, 16:38
Re: IsNumeric - by xRyder - 18.06.2011, 16:53
Re: IsNumeric - by Wesley221 - 18.06.2011, 16:55

Forum Jump:


Users browsing this thread: 1 Guest(s)