[HELP]І AJUDA COMPILANDO GM
#1

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 ?
Reply
#2

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;
Reply
#3

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;
}
Reply
#4

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

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;
Reply
#6

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


Forum Jump:


Users browsing this thread: 1 Guest(s)