SA-MP Forums Archive
[HELP]І AJUDA COMPILANDO GM - 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: [HELP]І AJUDA COMPILANDO GM (/showthread.php?tid=249077)



[HELP]І AJUDA COMPILANDO GM - tivin - 17.04.2011

Ao compilar meu gm da o seguinte erro:

C:\Documents and Settings\Particular\Meus documentos\Downloads\LASVENTURAS BR\Servidor\pawno\include\YSI/Visual/YSI_objects.own(3193) : warning 219: local variable "set" shadows a variable at a preceding level
C:\Documents and Settings\Particular\Meus documentos\Downloads\LASVENTURAS BR\Servidor\gamemodes\favelinhaedit.pwn(4480) : error 021: symbol already defined: "strtok"
C:\Documents and Settings\Particular\Meus documentos\Downloads\LASVENTURAS BR\Servidor\gamemodes\favelinhaedit.pwn(4493) : 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.

Alguem saberia como resolver ?


Re: [HELP]І AJUDA COMPILANDO GM - tivin - 17.04.2011

como assim a funзгo ? a linha toda й ou tal parte ? nгo entendo disso :S

@Edit
Lol, deletei o strtok sei lб da linha 4480 e a linha 3193 sу q deu erro aqui!

Linha 4480:

strtok(const string[], &index)

Linha 4493:

return result;


Re: [HELP]І AJUDA COMPILANDO GM - JonathanFeitosa - 17.04.2011

Funзгo Toda Por Favor. Deve Ser Isso :
pawn Code:
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: [HELP]І AJUDA COMPILANDO GM - Diogo_Bras - 17.04.2011

Coloque a funзгo completa e as linhas que dгo os erros.


Re: [HELP]І AJUDA COMPILANDO GM - tivin - 17.04.2011

Funзгo completa:
strtok(const string[], &index)
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;
}


Linha 3193:
CreateDynamicObject(13592, -1244.453, -443.192, 30.588, 0.0, -48.988, -33.750);

Linha 4493:
result[index - offset] = EOS;


Re: [HELP]І AJUDA COMPILANDO GM - JonathanFeitosa - 17.04.2011

pawn Code:
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;
}