error 017: undefined symbol "strtok"
#1

admin.pwn(40) : error 017: undefined symbol "strtok"
admin.pwn(40) : error 029: invalid expression, assumed zero
admin.pwn(40) : error 029: invalid expression, assumed zero
admin.pwn(40) : fatal error 107: too many error messages on one line

Whats on line 40-57:
Код:
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
#2

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

Fixed, Thanks.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)