undefined symbol "strtok"
#1

hi i got a error making a admin system through a tut what do i have to define?
Reply
#2

Add this to your script:

pawn Code:
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;
}
Reply
#3

Quote:
Originally Posted by spedico
View Post
Add this to your script:

pawn Code:
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;
}
thanks for de help +rep
Reply
#4

thanks you
Reply
#5

Quote:
Originally Posted by AsulKapa
View Post
thanks you
Why bump a year old topic? If you was not the creator and the topic wasn't created recently, you have no reason to post here.
Reply
#6

gracias por la ayuda
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)