SA-MP Forums Archive
[Ajuda] Problemas com strtok - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Problemas com strtok (/showthread.php?tid=380354)



Problemas com strtok - Renan_Sinister - 25.09.2012

Entгo pessoal eu to tentando compilar meu GM de Zombie e ta dando um erro de strtok vou postar a linha de erro :

pawn Код:
tmp = strtok(cmdtext, idx);
Esse й o Erro da Dialog do F5 :
pawn Код:
undefined symbol "strtok"



Re: Problemas com strtok - Maklister - 25.09.2012

coloca no fim do GM / FS

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;
}



Re: Problemas com strtok - Renan_Sinister - 25.09.2012

Consegui vlw (: