warning 219: local variable "yona" shadows a variable at a preceding level
#1

I named above your head to npcs and I get this warning

Код:
spaceranger\filterscripts\npcs.pwn(88) : warning 219: local variable "yona" shadows a variable at a preceding level
spaceranger\filterscripts\npcs.pwn(95) : warning 219: local variable "tiger" shadows a variable at a preceding level

Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:            564 bytes
Code size:             8916 bytes
Data size:           262560 bytes
Stack/heap size:      16384 bytes; estimated max. usage=315 cells (1260 bytes)
Total requirements:  288424 bytes

2 Warnings.
Lines


Код:
if(!strcmp(npcname, "Yona_Gery", true)) 
        {
            SetPlayerSkin(playerid, 4);
            PutPlayerInVehicle(playerid, yona, 0); 
            new Text3D:Yona = Create3DTextLabel("Yona_Gery (313)",0xFFFFFFFF,30.0,40.0,50.0,40.0,0); ((-----Line error
        	Attach3DTextLabelToPlayer(Yona, playerid, 0.0, 0.0, 0.2);
	}
        if(!strcmp(npcname, "Tiger_Nords", true)) 
        {
            SetPlayerSkin(playerid, 61);
            PutPlayerInVehicle(playerid, tiger, 0); 
            new Text3D:LV = Create3DTextLabel("Tiger_Nords (313)",0xFFFFFFFF,30.0,40.0,50.0,40.0,0); ((-----Line of error
        	Attach3DTextLabelToPlayer(tiger, playerid, 0.0, 0.0, 0.2);
	}
Reply
#2

it's mean that you are define " yona " and " tiger " 2 times.
you can ignore it but if you wanna to delete it
make the " yona " line like that:
pawn Код:
Text3D:Yona = Create3DTextLabel("Yona_Gery (313)",0xFFFFFFFF,30.0,40.0,50.0,40.0,0); ((-----Line error
and the " tiger ":
pawn Код:
Text3D:LV = Create3DTextLabel("Tiger_Nords (313)",0xFFFFFFFF,30.0,40.0,50.0,40.0,0); ((-----Line of error
if any errors tell me
Reply
#3

Код:
if(!strcmp(npcname, "Yona_Gery", true)) 
        {
            SetPlayerSkin(playerid, 4);
            PutPlayerInVehicle(playerid, yona, 0); 
            new Text3D:PTD1 = Create3DTextLabel("Yona_Gery (313)",0xFFFFFFFF,30.0,40.0,50.0,40.0,0); ((-----Line error
        	Attach3DTextLabelToPlayer(PTD1, playerid, 0.0, 0.0, 0.2);
	}
        if(!strcmp(npcname, "Tiger_Nords", true)) 
        {
            SetPlayerSkin(playerid, 61);
            PutPlayerInVehicle(playerid, tiger, 0); 
            new Text3D:PTD1 = Create3DTextLabel("Tiger_Nords (313)",0xFFFFFFFF,30.0,40.0,50.0,40.0,0); ((-----Line of error
        	Attach3DTextLabelToPlayer(PTD1, playerid, 0.0, 0.0, 0.2);
	}
Reply
#4

I solved the missing PTD1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)