[Ajuda] Como Corrigir os seguintes erros!
#1

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

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

sera q ele tem a strtok definida?
Reply
#4

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

pawn Код:
x_nr, "uniforme"
Reply
#5

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

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.
Reply
#7

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. =)
Reply
#8

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

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

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


Forum Jump:


Users browsing this thread: 3 Guest(s)