fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    Warning from condition block

    Questions & Answers
    3
    5
    1568
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      Traderz last edited by

      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

      1 Reply Last reply Reply Quote 0
      • J
        josecortesllobat last edited by

        Could you share a screenshot showing the content of that block?

        T 1 Reply Last reply Reply Quote 0
        • T
          Traderz @josecortesllobat last edited by

          @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

          1 Reply Last reply Reply Quote 0
          • fxDreema
            fxDreema last edited by

            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 🙂

            T 1 Reply Last reply Reply Quote 1
            • T
              Traderz @fxDreema last edited by

              @fxdreema Aha Thanks alot

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post

              Online Users

              S
              S
              P
              C
              E
              K

              12
              Online

              146.7k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors