SA-MP Forums Archive
warning 206: redundant test: constant expression is non-zero - 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 206: redundant test: constant expression is non-zero (/showthread.php?tid=432150)



warning 206: redundant test: constant expression is non-zero - ridhoswasta - 21.04.2013

Line : E:\LBRP\gamemodes\LBRP.pwn(29014) warning 206: redundant test: constant expression is non-zero

pawn Code:
if(USE_TEXTDRAW_SET == 2)
How to fix that?


Re: warning 206: redundant test: constant expression is non-zero - MP2 - 21.04.2013

You (or someone else using the same script) posted about this a few days ago.

Basically, USE_TEXTDRAW_SET is defined as 2, so you're doing:

if(2 == 2)

which is, as the warning says, redundant (useless).

Use #if or change the define to a variable.


Re: warning 206: redundant test: constant expression is non-zero - ridhoswasta - 21.04.2013

Thanks