03.02.2012, 12:50
Delete the string from line 100 and replace IsNumeric and strtok to
pawn Код:
strtok(const Msg[], &index)
{
new length = strlen(Msg);
while ((index < length) && (Msg[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (Msg[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = Msg[index];
index++;
}
result[index - offset] = EOS;
return result;
}
IsNumeric(const Msg[])
{
for (new i = 0, j = strlen(Msg); i < j; i++)
{
if (Msg[i] > '9' || Msg[i] < '0') return 0;
}
return 1;
}