SA-MP Forums Archive
[Ajuda] Como Corrigir os seguintes erros! - 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] Como Corrigir os seguintes erros! (/showthread.php?tid=289507)



[Resolvido By P. Pawn] Como Corrigir os seguintes erros! - CaSSCaT - 11.10.2011

pawn Код:
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(18911) : error 017: undefined symbol "strtok"
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(18911) : error 033: array must be indexed (variable "tmp")
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(18949) : error 017: undefined symbol "strtok"
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(18949) : error 033: array must be indexed (variable "tmp")
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(19054) : error 017: undefined symbol "strtok"
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(19054) : error 033: array must be indexed (variable "tmp")
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(19066) : error 017: undefined symbol "strtok"
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(19066) : error 033: array must be indexed (variable "tmp")
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(19117) : error 017: undefined symbol "strtok"
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(19117) : error 033: array must be indexed (variable "tmp")
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(19530) : error 017: undefined symbol "strtok"
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(19530) : error 033: array must be indexed (variable "tmp")
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(19556) : error 017: undefined symbol "strtok"
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(19556) : error 033: array must be indexed (variable "tmp")
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(19721) : error 017: undefined symbol "strtok"
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(19721) : error 033: array must be indexed (variable "tmp")
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(19907) : error 017: undefined symbol "strtok"
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(19907) : error 033: array must be indexed (variable "tmp")
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(19938) : error 017: undefined symbol "strtok"
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(19938) : error 033: array must be indexed (variable "tmp")
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(20018) : error 017: undefined symbol "strtok"
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(20018) : error 033: array must be indexed (variable "tmp")
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BCF.pwn(20157) : error 017: undefined symbol "strtok"
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BCF.pwn(20157) : error 033: array must be indexed (variable "tmp")
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BCF.pwn(21645) : warning 225: unreachable code
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(22002) : error 017: undefined symbol "strtok"
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(22002) : error 033: array must be indexed (variable "x_uniforme")

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.
Alguem pode dar uma ajuda ai como ajeitar esses erros?


Re: [Ajuda] Como Corrigir os seguintes erros! - Dolby - 11.10.2011

Esses erros estao sendo causados por falta de abrir/fechar as Chaves " { e }".veja a ultima coisa que fez por ultimo e revise se toda chave que abre fecha.


Re: [Ajuda] Como Corrigir os seguintes erros! - StreetGT - 11.10.2011

sera q ele tem a strtok definida?


Re: [Ajuda] Como Corrigir os seguintes erros! - Jason_King - 11.10.2011

O ъltimo troca
pawn Код:
x_uniforme
por:

pawn Код:
x_nr, "uniforme"



Re: [Ajuda] Como Corrigir os seguintes erros! - Josma_cmd - 11.10.2011

Coloque no final do seu GM.

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;
}
Coloca no inicio da callback (public OnPlayerCommandText(playerid, cmdtext)
pawn Код:
new cmd[128], tmp[60], idx;
cmd = strtok(cmdtext, idx);



Re: [Ajuda] Como Corrigir os seguintes erros! - CaSSCaT - 11.10.2011

Josma Fiz tudo direitinho,
so que agora apareceu esses!

pawn Код:
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(16631) : error 021: symbol already defined: "cmd"
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(16633) : error 021: symbol already defined: "tmp"
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(16634) : error 021: symbol already defined: "idx"
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(21647) : warning 225: unreachable code
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(16624) : warning 204: symbol is assigned a value that is never used: "tmp"
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(58398) : warning 203: symbol is never used: "ReduceTime"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.



Re: [Ajuda] Como Corrigir os seguintes erros! - Josma_cmd - 11.10.2011

Apaga o new
pawn Код:
cmd[128], tmp[60], idx;
Coloca no final do GM:
pawn Код:
#pragma unused ReduceTime
Na prуxima vez posta as linhas dos erros por favor. =)


Re: [Ajuda] Como Corrigir os seguintes erros! - CaSSCaT - 11.10.2011

Josma eu tiro todos os new la do public OnPlayerCommandText(playerid, cmdtext[]) code que voce me passou?


Re: [Ajuda] Como Corrigir os seguintes erros! - ceesar90 - 11.10.2011

Quote:
Originally Posted by CaSSCaT
Посмотреть сообщение
Josma eu tiro todos os new la do public OnPlayerCommandText(playerid, cmdtext[]) code que voce me passou?
pelo oque entendi ele disse pra tirar apenas este:
pawn Код:
new cmd[128], tmp[60], idx;
se vocк fosse retirar todos o gm nem iria compilar.
ou pelo oque entendi secundбriamente, й pra vocк tirar o
pawn Код:
new cmd[128]
new tmp[60]
new idx;



Re: [Ajuda] Como Corrigir os seguintes erros! - CaSSCaT - 11.10.2011

Persiste os erros,

pawn Код:
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(16624) : error 017: undefined symbol "cmd"
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(16624) : warning 215: expression has no effect
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(16624) : error 001: expected token: ";", but found "]"
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(16624) : error 029: invalid expression, assumed zero
D:\Cбssio\samp03csvr_R2-2_win32\gamemodes\BTL.pwn(16624) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Das Linhas,

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
16624    cmd[128], tmp[60], idx;