[Ajuda] Erros Inventario
#1

Olб, tava colocando na minha gamemode essa FS

http://pastebin.com/PhCnC3dr

Ela й Dof2 e a minha gm й em dini entгo peguei e mudei todas Dof2 para dini.

e como a Fs й zcmd e a minha n eu mudei para aqla normal do samp

pawn Код:
if(strcmp("/inventario", cmdtext, true, 10) == 0)
    {
        new Inv[160];
        new Nome[20];
        for(new i = 0; i != 8; i++)
        {
                GetWeaponName(InventarioArma[i][playerid], Nome, 20);
                strcat(Inv, InventarioArma[i][playerid] > 0 ? (InventarioArma[i][playerid] == 18 ? ("Cocktail Molotov") : (Nome)) : ("(Vazio)"));
                strcat(Inv, "\n");
        }
        strcat(Inv, "Guardar equipamento atual");
        ShowPlayerDialog(playerid, DialogInv, DIALOG_STYLE_LIST, "Itens", Inv, "Selecionar", "Fechar");
        return 1;
}
Deu esses erros.

pawn Код:
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\pawno\include\dini.inc(239) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(355) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(1970) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(2280) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(2716) : warning 219: local variable "Nome" shadows a variable at a preceding level
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(2717) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(2815) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3131) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3133) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3135) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3137) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3143) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3145) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3148) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3153) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3158) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3162) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3165) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3168) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3292) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3296) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3298) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3301) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3303) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3307) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3313) : error 021: symbol already defined: "strins"
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3314) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3322) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3346) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3348) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3363) : warning 219: local variable "Nome" shadows a variable at a preceding level
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3367) : error 017: undefined symbol "dini_FileExists"
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3369) : error 017: undefined symbol "dini_CreateFile"
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3372) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3375) : error 017: undefined symbol "dini_SetInt"
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3377) : error 017: undefined symbol "dini_SetInt"
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3379) : error 017: undefined symbol "dini_SaveFile"
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3471) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3497) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3541) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3572) : warning 203: symbol is never used: "Nome"
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3572) : warning 203: symbol is never used: "Tentativas"
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3572) : warning 203: symbol is never used: "i"
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3572) : warning 203: symbol is never used: "string"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


25 Errors.
Reply
#2

Vocк passou para DINI mas manteve a include DOF2 e nгo a substituiu por DINI... Й uma lбstima!
Var "i" foi definida em alguma funзгo acima dessa;
Tem variaveis q vc nem estб utilizando ai...
Reply
#3

mas oque eu tenho q faze ?

nгo entendo mto bem...

oq precisa mudar
Reply
#4

Olha lб no topo nas includes:
Verifique onde hб DOF2.
Se houver e vc tiver substituido todo o sistema em dof2 para dini, insira no lugar de DOF2 o nome da include DINI.

Verifique tbm o loop, a var "i" jб foi definida em alguma funзгo acima e tem variбveis que nгo estгo sendo utilizadas.
Reply
#5

Resolvi um pouco dos erros.
uma stock tava escrito tock

pawn Код:
if(dialogid == D_LOGARUPP)
    {
        if(response)
        {
            if(strlen(inputtext))
            {
                if(strlen(inputtext) == dini_Int(gFile, "Senha"))
                {
                    SendClientMessage(playerid, COLOR_SERVER, "| INFO | Logado(a) com sucesso!") && GameTextForPlayer(playerid, "~y~LOGADO COM SUCESSO!", 1000, 5);
                    logado[playerid] = true;
                    CarregarFileNome(playerid);
                    CarregarIventario(playerid);
                    return 1;
                }
                else // 3145
                {
                    Tentativas[playerid] ++;
                    if(Tentativas[playerid] == 5) //3148
                    {
                        Tentativas[playerid] = 0;
                        SendClientMessage(playerid, COLOR_ERRO, "(Ч) Vocк errou 5 vezes a senha e foi kickado !") && GameTextForPlayer(playerid, "~r~KICKADO(A)!", 1000, 5);
                        Kick(playerid);
                        return 1; // 3153
                    }
                    format(gStr, sizeof(gStr), "Ч Senha Errada!\n\n{FFFFFF}Usuбrio: %s\n\n{FFFFFF}Digite sua senha:", PlayerName(playerid));
                    ShowPlayerDialog(playerid, D_LOGARUPP, DIALOG_STYLE_INPUT, "Login", gStr, "Logar", "Sair");
                    SendClientMessage(playerid, COLOR_SERVER, "{FF0000}Ч Senha Errada!");
                    return 1; // 3158
                }
            }
        }
        else //3162
        {
            SendClientMessage(playerid, COLOR_SERVER, "| INFO | Login cancelado!") && GameTextForPlayer(playerid, "~r~LOGIN CANCELADO!", 1000, 5);
            return 1; //3165
        }
    }
    return 1; //3168
}
pawn Код:
stock SalvarIventario(playerid)
{
        new Nome[25];
        GetPlayerName(playerid,Nome,sizeof(Nome));
        new Arquivo[41]="Inventarios/.ini";
        strins(Arquivo, Nome, 12, 25);
        if(!dini_FileExists(Arquivo)) //3367
        {
                dini_CreateFile(Arquivo); //3369
        }
        new str[12];
        for(new i = 0; i != 8; ++i)
        {
                format(str, sizeof(str), "Arma inv %d", i);
                dini_SetInt(Arquivo, str, InventarioArma[i][playerid]); //3375
                format(str, sizeof(str), "Ammo inv %d", i);
                dini_SetInt(Arquivo, str, InventarioAmmo[i][playerid]); //3377
        }
        dini_SaveFile(); //3379
        return 1;
}
pawn Код:
forward ApagarContagem();
public ApagarContagem()
{
    TextDrawHideForAll(TextContagem);
    TextDrawHideForAll(TextcNumero);
    cNaTela = false;
    cNumero = 5;
    return 1;
} //3572
os outros erros sгo nessas linhas.
Reply
#6

bugo escrevi duas vez.
Reply
#7

Edite seu post acima e use linhas comentadas para cada linha com erro. Assim й mais fбcil vrificar.
ex:
Quote:

dini_SaveFile(); // LINHA 3351

Reply
#8

Editado.
Reply
#9

Erros na callback OnDialogResponse sгo de fato includes desatualizadas, aki compilou de boa.

Erros nas linhas de DINI sгo pq vc n declarou a include DINI, como comentei anteriormente. Vc apenas substituiu funзхes de uma livraria por outra, mas n declarou essa livraria.

Quote:

#include dini

Na callback ApagarContagem nгo hб erro algum, a verdade й que quando uma variбvel ou umas variбveis nгo estгo sendo utilizadas, segue um aviso na ъltima linha do GM.

Quote:

warning 203: symbol is never used: "variavel"

Reply
#10

#include <dini>
mano ta aq mano e segue os mesmos erros...

espera ai vou postar o dialog

pawn Код:
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3131) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3133) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3135) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3137) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3143) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3145) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3148) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3153) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3158) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3162) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3165) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3168) : error 010: invalid function or declaration
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3367) : error 017: undefined symbol "dini_FileExists"
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3369) : error 017: undefined symbol "dini_CreateFile"
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3375) : error 017: undefined symbol "dini_SetInt"
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3377) : error 017: undefined symbol "dini_SetInt"
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3379) : error 017: undefined symbol "dini_SaveFile"
C:\Users\Gustavo\Desktop\PB explosive\Sabotage H1Z1\Gamemodes\PBE.pwn(3572) : warning 203: symbol is never used: "Tentativas"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


17 Errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)