SA-MP Forums Archive
[Ajuda] Erro local variable "Nome" - 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] Erro local variable "Nome" (/showthread.php?tid=515208)



Erro local variable "Nome" - best95 - 25.05.2014

tenho a sscanf2.inc na pasta do pawno e ainda da esses erros aqui,oque sera??

C:\Users\Gabriel\Desktop\zP.pwn(1743) : warning 219: local variable "Nome" shadows a variable at a preceding level
C:\Users\Gabriel\Desktop\zP.pwn(3141) : warning 219: local variable "Nome" shadows a variable at a preceding level
C:\Users\Gabriel\Desktop\zP.pwn(3542) : warning 219: local variable "Nome" shadows a variable at a preceding level


Re: Erro local variable "Nome" - yNexus - 25.05.2014

posta a linha, mais pelo oque da para ver, й que 2 variaveis com mesmo nome .
exemplo
new Nome;
new Nome;



Re: Erro local variable "Nome" - DiiMeNoR - 25.05.2014

** Warning 219: local variable "diimenor" shadows a variable at a preceding level

A variбvel chamada foi criada em um nнvel anterior.

Exemplo:
pawn Код:
//ERRADO
public DiimenorTest()
{
    new diimenor;
    if(Exemplo)
    {
        new diimenor;
        diimenor = 1;
    }
}
pawn Код:
//CERTO
public DiimenorTest()
{
    new diimenor;
    if(Exemplo)
    {
        diimenor = 1;
    }
}
Dб uma olhada no code ai.


Re: Erro local variable "Nome" - best95 - 25.05.2014

LINHA: 1743
new Nome[MAX_PLAYER_NAME];
LINHA: 3141
static Nome[MAX_PLAYER_NAME]; GetPlayerName(playerid, Nome, sizeof(Nome)); return Nome;
LINHA: 3542
new Nome[MAX_PLAYER_NAME];


Re: Erro local variable "Nome" - DiiMeNoR - 25.05.2014

Apaga, sу deixa um.
Код:
new Nome[MAX_PLAYER_NAME];



Re: Erro local variable "Nome" - best95 - 25.05.2014

se eu tiro uma somente ja enxe de erros!! q merda isso...primeiro gm em zcmd que faзo.


Re: Erro local variable "Nome" - DiiMeNoR - 25.05.2014

Cara OLHA minha explicaзгo sobre warning 219 acima, e tente resolver.