[AJUDA]Error define Strtok
#1

Galera to copilando um GM o Hatycone (._.')To editando ele sу q tem um problema ele sempre dб esse maldito erro @:
Код:
F:\GTA San\SAMP 0.3b\Geral RP\pawno\include\dudb.inc(275) : error 017: undefined symbol "strtok"
F:\GTA San\SAMP 0.3b\Geral RP\pawno\include\dudb.inc(276) : error 017: undefined symbol "strtok"
F:\GTA San\SAMP 0.3b\Geral RP\pawno\include\dudb.inc(277) : error 017: undefined symbol "strtok"
F:\GTA San\SAMP 0.3b\Geral RP\pawno\include\dudb.inc(278) : error 017: undefined symbol "strtok"
F:\GTA San\SAMP 0.3b\Geral RP\pawno\include\dudb.inc(279) : error 017: undefined symbol "strtok"
F:\GTA San\SAMP 0.3b\Geral RP\pawno\include\dudb.inc(280) : error 017: undefined symbol "strtok"
F:\GTA San\SAMP 0.3b\Geral RP\pawno\include\dudb.inc(281) : error 017: undefined symbol "strtok"
F:\GTA San\SAMP 0.3b\Geral RP\pawno\include\dudb.inc(282) : error 017: undefined symbol "strtok"
F:\GTA San\SAMP 0.3b\Geral RP\pawno\include\dudb.inc(283) : error 017: undefined symbol "strtok"
F:\GTA San\SAMP 0.3b\Geral RP\pawno\include\dudb.inc(284) : error 017: undefined symbol "strtok"
F:\GTA San\SAMP 0.3b\Geral RP\pawno\include\dudb.inc(285) : error 017: undefined symbol "strtok"
F:\GTA San\SAMP 0.3b\Geral RP\pawno\include\dudb.inc(286) : error 017: undefined symbol "strtok"
F:\GTA San\SAMP 0.3b\Geral RP\pawno\include\dudb.inc(287) : error 017: undefined symbol "strtok"
F:\GTA San\SAMP 0.3b\Geral RP\pawno\include\dudb.inc(288) : error 017: undefined symbol "strtok"
F:\GTA San\SAMP 0.3b\Geral RP\pawno\include\dudb.inc(289) : error 017: undefined symbol "strtok"
F:\GTA San\SAMP 0.3b\Geral RP\pawno\include\dudb.inc(290) : error 017: undefined symbol "strtok"
F:\GTA San\SAMP 0.3b\Geral RP\pawno\include\dudb.inc(291) : error 017: undefined symbol "strtok"
F:\GTA San\SAMP 0.3b\Geral RP\pawno\include\dudb.inc(274) : warning 203: symbol is never used: "i"
Jah tentei de tudo mais n to consiguindo .-.'
Jah tentei coloka uma Define nele @:
Help me D:
Reply
#2

ja baixou a inc + nova?
Reply
#3

os erros sao na include dudb, tente adicionar isso ao final do GM ou INC:
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;
}
Este foro requiere que tъ esperes 120 segundos entre mensajes. Por favor intenta de nuevo en 37 segundos.
Fuck U, fuckin' Anti-Flood
Reply
#4

Coloque ao Final GM:


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
#5

Ali esta dando ero dentro da .inc add o strtok dentro da inc ou baixe uma q ja tem ou define no gm msm

qual a diferenca de criar exemplo uma funзгo "solta" ou "strock" ou "public"
Reply
#6

с funciono D:
Reply
#7

Estou tendo quase o mesmo erro que ele
sу que ta abortando sempre a compilaзao =\
Alguem me ajuda fazendo favor ?
MSninhozitos@hotmail.com

C:\Documents and Settings\Dinhoo.Zitoos\Desktop\SERVER SAMP\pawno\include\YSI/Visual/YSI_objects.own(3193) : warning 219: local variable "set" shadows a variable at a preceding level
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(145 : error 017: undefined symbol "strtok"
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(1459) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(1460) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(1461) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(1462) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(1463) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(1464) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(1457) : warning 204: symbol is assigned a value that is never used: "index"
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(151 : error 017: undefined symbol "EventoCriado"
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(151 : warning 215: expression has no effect
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(159 : error 001: expected token: ";", but found "new"
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(1599) : error 001: expected token: ";", but found "new"
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(1600) : error 001: expected token: ";", but found "-identifier-"
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(1962) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(1962) : error 033: array must be indexed (variable "cmd")
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(235 : error 017: undefined symbol "strtok"
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(235 : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(2424) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(2424) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(2449) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(2449) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(2479) : error 001: expected token: ";", but found "-identifier-"
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(2564) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(2564) : error 033: array must be indexed (variable "tmp")
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(2565) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(2565) : error 033: array must be indexed (variable "tmp2")
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(2605) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Dinhoo.Zitoos\Desktop\Crotoan.pwn(2605) : error 033: array must be indexed (variable "tmp")
Reply
#8

lol...add isso no final do gm:
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
#9

top
pawn Код:
#define strtok strtok2
         #pragma unused 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;
}
Esse funciona no meu tranquilamente ;\
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)