SA-MP Forums Archive
Warning 219 Local Variable - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Warning 219 Local Variable (/showthread.php?tid=451812)



Warning 219 Local Variable - RandomDude - 18.07.2013

Line 598
pawn Код:
new PlayerName[MAX_PLAYER_NAME];
Line 801
pawn Код:
new PlayerName[MAX_PLAYER_NAME], str[128];
Line 879
pawn Код:
new pName[MAX_PLAYER_NAME];
Line 11235
pawn Код:
new PlayerName[MAX_PLAYER_NAME];
Код:
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\LuxAdmin.pwn(598) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\LuxAdmin.pwn(801) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\LuxAdmin.pwn(879) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\LuxAdmin.pwn(11235) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Warnings.



Re: Warning 219 Local Variable - ikbenremco - 18.07.2013

Remove all those lines.

They are already defined somewhere else.


Re: Warning 219 Local Variable - SMCentral - 18.07.2013

The user above is correct, what those warnings mean is that those new values or strings have been already defined above.

You could change it from a global value to a local one.


Re: Warning 219 Local Variable - RandomDude - 19.07.2013

I get so many errors if I remove all the lines even if I remove one I get loads of errors


Re: Warning 219 Local Variable - JonnyDeadly - 19.07.2013

Show us the errors you receive when you attempt to remove the variables.


Re: Warning 219 Local Variable - RandomDude - 19.07.2013

I removed line 879 and got these errors
Quote:

C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\LuxAdmin.pwn(59 : warning 219: local variable "PlayerName" shadows a variable at a preceding level
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\LuxAdmin.pwn(801) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\LuxAdmin.pwn(879) : error 076: syntax error in the expression, or invalid function call
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\LuxAdmin.pwn(879) : error 072: "sizeof" operator is invalid on "function" symbols
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\LuxAdmin.pwn(880) : error 076: syntax error in the expression, or invalid function call
C:\Users\Grand\Desktop\Ultimate Gaming Ground\filterscripts\LuxAdmin.pwn(11235) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.

On some I RECEIVE LOADS OF ERRORS