25.07.2011, 17:22
IsNumeric:
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))
{
//its a number!
}
else return 1; //not a number.