07.08.2010, 12:46
Undefined symbol "strtok" problem solving with:
I prefer using strtok(const string[], &index) because you use it for 2 parts, and with seperator its 3 I think, not sure, and make the size bigger of error 47 line (e.g. if you have
change it to for example
pawn Код:
stock strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
pawn Код:
new string[100];
pawn Код:
new string[200];