21.03.2009, 11:02
Quote:
Originally Posted by brett7
it says undefined symbol strtok did you define it right?
pawn Code:
|
pawn Code:
strtok(const string[], &index, separator = ' ')
{
new length = strlen(string);
while ((index < length) && (string[index] <= separator))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > separator) && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}