SA-MP Forums Archive
Annoying warning. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Annoying warning. (/showthread.php?tid=228679)



Annoying warning. - darkknight123 - 20.02.2011

Im getting this warning over and over again can someone please explain to me why it does this so i know how to fix it in the future and how to fix it?

Код:
warning 219: local variable "string" shadows a variable at a preceding level



Re: Annoying warning. - Backwardsman97 - 20.02.2011

It means that you have declared a variable named 'string' within the same scope as another variable with that name. Kinda hard to explain.

pawn Код:
new string[128];

new string[128];
That would generate that warning.


Re: Annoying warning. - darkknight123 - 20.02.2011

So how would i fix that?


Re: Annoying warning. - vakhtang - 20.02.2011

Delete the second one


Re: Annoying warning. - darkknight123 - 20.02.2011

mmmkayy looks ike i got to delete 51 of em then :/