SA-MP Forums Archive
[Ajuda]erros na compilaзao - 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]erros na compilaзao (/showthread.php?tid=248690)



[Ajuda]erros na compilaзao - DrTHE - 15.04.2011

¬¬

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;
}
Код:
C:\Documents and Settings\SAMP-SERVER\Desktop\ccar.pwn(156) : error 021: symbol already defined: "strtok"
C:\Documents and Settings\SAMP-SERVER\Desktop\ccar.pwn(171) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: [Ajuda]erros na compilaзao - [AF]Junior - 15.04.2011

Certeza que sгo essas as linhas?

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;
}
Isso fica fora das publics, lб em baixo. E ve se jб tem uma igual a essa.


Re: [Ajuda]erros na compilaзao - Woozie_SlaYeR - 15.04.2011

PHP код:
error 021symbol already defined"strtok" Sнmbolo ja definido 
ou seja, apague essa


Re: [Ajuda]erros na compilaзao - Macintosh - 15.04.2011

CTRL + F em seu gamemode e coloque na linha strtok(const string[], &index)

Apague a funзгo

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



Re: [Ajuda]erros na compilaзao - Diogo_Bras - 15.04.2011

Isso й muito comum acontecer, apague-o e fica o problema resolvido!