14.03.2011, 20:46
Hello, currently i got some troubles with strtok. I am scripting a stunt server. And well, i get this errors.
This is the line where the errors are on:
This is my OnGameModeInit code, Where the strtok code is on:
Cant find what the problem is, Anybody knows?
Thanks, Alex
Код:
error 017: undefined symbol "strtok" invalid expression, assumed zero error 029: invalid expression, assumed zero fatal error 107: too many error messages on one line
pawn Код:
strtok(const string[], &index)
pawn Код:
public OnGameModeInit()
{
new string[MAX_PLAYER_NAME];
SetGameModeText("WW-Stunts Beta");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
{
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;
}
return 1;
}
}
Thanks, Alex