Suddenly getting a wierd warning.
#1

I tried to compile my gamemode today, and I got these warnings.
Is there any fix for this? I have no idea where this is comming from.

Код:
C:\Users\Daniel\Desktop\withal\pawno\include\YSI\y_iterate.inc(696) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\Daniel\Desktop\withal\pawno\include\YSI\y_iterate.inc(820) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\Daniel\Desktop\withal\pawno\include\a_zones.inc(420) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\Daniel\Desktop\withal\pawno\include\OnPlayerPause.inc(41) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\Daniel\Desktop\withal\pawno\include\mSelection.inc(657) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\Daniel\Desktop\withal\pawno\include\playerzone.inc(422) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\Daniel\Desktop\withal\pawno\include\playerzone.inc(445) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\Daniel\Desktop\withal\pawno\include\OPA.inc(28) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\Daniel\Desktop\withal\pawno\include\YSI\y_hooks/impl.inc(323) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\Daniel\Desktop\withal\pawno\include\checkpns.inc(25) : warning 219: local variable "i" shadows a variable at a preceding level
Reply
#2

They're warnings, For sometimes they effect and for sometimes they don't,
Try to run the script, Maybe it would work, And update the YSI includes, Same as the others.
Reply
#3

Generally when I get this warnings that aren't within the actual script, I missed putting in a bracket somewhere. Try commenting out sections of your code to see if the warnings stop.
Reply
#4

You are using i somewhere without declaring it, I.E: for(i=0;i<100;i++)
when this shadowing goes all the way into includes it's almost always this ^^
Reply
#5

Solution: don't create single letter global variables. The temporary variable i has been used as the designated iterator in for-loops since the day of Fortran.

Also don't tell people to ignore warnings. They're there to tell you that you probably screwed something up which is likely to have an adverse and/or unknown effect.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)