I need some help please
#1

I have these error when i compile:
C:\Documents and Settings\Test\Desktop\GameZone\gamemodes\GameZone. pwn(12136) : error 021: symbol already defined: "strtok"
C:\Documents and Settings\Test\Desktop\GameZone\gamemodes\GameZone. pwn(12151) : error 047: array sizes do not match, or destination array is too small

And these are lines 12136 and 12151:
12136: strtok(const string[], &index)
{
12151: return result;

What i need to do to solve this please help me
Reply
#2

Код:
C:\Documents and Settings\Test\Desktop\GameZone\gamemodes\GameZone. pwn(12136) : error 021: symbol already defined: "strtok"
strtok is already defined, you have defined 2 or more times strtok.

Код:
C:\Documents and Settings\Test\Desktop\GameZone\gamemodes\GameZone. pwn(12151) : error 047: array sizes do not match, or destination array is too small
Here is the definition of strtok:
pawn Код:
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;
}
https://sampwiki.blast.hk/wiki/Strtok
Reply
#3

thanks you so much i will try this now
Reply
#4

again give me these errors
C:\Documents and Settings\Test\Desktop\GameZone\gamemodes\GameZone. pwn(12136) : error 021: symbol already defined: "strtok"
C:\Documents and Settings\Test\Desktop\GameZone\gamemodes\GameZone. pwn(12151) : error 047: array sizes do not match, or destination array is too small

EDIT: I have solved the problem! Simple deleted the definition!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)