Warning from condition block
-
Hello ,
I just have a simple inquiry.
When I use the condition block where you enter a custom “ if statement” it gives you a warning when compiling as “ expression not boolean “ as the program automatically add 0 before and after the statement .
It doesn’t seem to affect the functionality of the program but I’d like to know of there’s somethin wrong I’m doing or if that warning can be permanently fixed
Thanks -
Could you share a screenshot showing the content of that block?
-
@josecortesllobat
whatever the content of the block it show the same warning while compiling
For example : I have an option to enable or disable Trailing
So the content is " ( Trailing == ture ) " so If this statement is true the condition pass to the next block
not just this statement but whatever the statement it's going to be like that
That's because in the code , this statement is translated into
if (0| (c::Trailing==true) |0)
instead of
if (c::Trailing==true) which easily solve that warning
so what's the function of those "0|" and "|0" here -
If it works, you should not care. These 0 things are there to prevent compile errors when no condition is written, then the condition becomes 0||0, which is false

-
@fxdreema Aha Thanks alot