[Ajuda] strtok
#1

Код:
C:\DOCUME~1\PC1\MEUSDO~1\DOWNLO~1\Samppp\SAMP0~1.3AR\GAMEMO~1\Teste.pwn(1085) : error 017: undefined symbol "strtok"
C:\DOCUME~1\PC1\MEUSDO~1\DOWNLO~1\Samppp\SAMP0~1.3AR\GAMEMO~1\Teste.pwn(1085) : error 033: array must be indexed (variable "tmp")
C:\DOCUME~1\PC1\MEUSDO~1\DOWNLO~1\Samppp\SAMP0~1.3AR\GAMEMO~1\Teste.pwn(1091) : error 017: undefined symbol "strtok"
C:\DOCUME~1\PC1\MEUSDO~1\DOWNLO~1\Samppp\SAMP0~1.3AR\GAMEMO~1\Teste.pwn(1091) : error 033: array must be indexed (variable "tmp")
Oque й este strtok? pq ele esta aparencendo? numca tive problema com este treco -.-

As linhas:

Код:
85:	    tmp = strtok(cmdtext, idx);
91:	    tmp = strtok(cmdtext, idx);
Reply
#2

Coloque isso no seu GM, pode ser em qualquer lugar, menos dentro das publics:

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


Forum Jump:


Users browsing this thread: 1 Guest(s)