[Ajuda] Erro com warning 219
#1

(3200 : warning 219: local variable "weapons" shadows a variable at a preceding level


Linha 32008:
pawn Код:
new weapons[13][2];
Como usei o "weapons":
pawn Код:
GetPlayerWeaponData(giveplayerid, 1, weapons[1][0], weapons[1][1]);
GetPlayerWeaponData(giveplayerid, 2, weapons[2][0], weapons[2][1]);
format(string, sizeof(string), "Slot 1: [%s] (Muniзгo: [%d]) | Slot 2: [%s] (Muniзгo: [%d])",aNames[weapons[1][0]], weapons[1][1], aNames[weapons[2][0]], weapons[2][1]);
SendClientMessage(playerid, COLOR_YELLOW, string);
Reply
#2

Tente mudar o nome da variavel de weapons para sweapons.
Reply
#3

pawn Код:
new armas[13][2];
pawn Код:
GetPlayerWeaponData(giveplayerid, 1, armas[1][0], armas[1][1]);
GetPlayerWeaponData(giveplayerid, 2, armas[2][0], armas[2][1]);
format(string, sizeof(string), "Slot 1: [%s] (Muniзгo: [%d]) | Slot 2: [%s] (Muniзгo: [%d])",aNames[armas[1][0]], armas[1][1], aNames[armas[2][0]], armas[2][1]);
SendClientMessage(playerid, COLOR_YELLOW, string);
Reply
#4

Deu certнssimo galera! Sу troquei o nome da variбvel!
Obrigadгo pra vocкs dois aн. Ganharam mais reputaзгo... Obrigado! (:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)