local variable "pName" shadows a variable at a preceding level - 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: local variable "pName" shadows a variable at a preceding level (
/showthread.php?tid=331700)
local variable "pName" shadows a variable at a preceding level -
Jack_Rocker - 05.04.2012
local variable "pName" shadows a variable at a preceding level
I keep getting this warning, I know what is causing, however, I don't want to fix it by getting rid of it (because this causes more errors). I really just want to 'hide' the warning...
Any ideas?
Re: local variable "pName" shadows a variable at a preceding level -
Kitten - 05.04.2012
you defined the variable pName twice, you can try renaming the other one to pName2.
example of what you're doing wrong
pawn Code:
new pName;
new pName;
// more like to be this way to get rid of the warnings.
new pName;
new pNameTwo;