22.12.2013, 20:51
There's a much simplier/faster way.
Example of usage:
pawn Код:
stock IsNumeric(const string[])
{
for (new i = 0, j = strlen(string); i < j; i++)
{
if (string[i] > '9' || string[i] < '0') return 0;
}
return 1;
}
pawn Код:
if (IsNumeric(inputtext))
{
// inputtext contains only numbers, do something here..
}