18.06.2011, 16:38
Hey guys,
Can anyone get me the IsNumeric function/stock (however you call it)?
I've already got this one:
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
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;
}
~Wesley