Forum
    • Categories
    • Register
    • Login

    Comparison Fails?

    Scheduled Pinned Locked Moved Solved Scripting
    12 Posts 4 Posters 691 Views
    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.
    • David HealeyD
      David Healey @clevername27
      last edited by David Healey

      @clevername27 said in Comparison Fails?:

      …but not this (Unknown function 'length'):

      Show me a screenshot of where you're using it in your code?

      I think the clue might be in the word "function".

      Free HISE Bootcamp Full Course for beginners.
      YouTube Channel - Public HISE tutorials
      My Patreon - HISE tutorials

      C 1 Reply Last reply Reply Quote 1
      • C
        clevername27 @David Healey
        last edited by

        @d-healey

        78d79c44-c99c-46ec-bc7e-9696170af45e-image.png

        vs

        d870f95d-a385-4906-b65e-225cf5f0421e-image.png

        Thanks, man.

        dataPart is a string, though I don't see why it would matter?

        David HealeyD 1 Reply Last reply Reply Quote 0
        • David HealeyD
          David Healey @clevername27
          last edited by David Healey

          Weird that it says function, I thought it was going to be a typo like length() but nope...

          One thing I've found very useful in HISE lately is type safety, it helps me avoid a lot of simple bugs. Try adding it to your function, that way it will alert you if at any time you are passing the wrong data type to the function.

          inline function RestoreStateOfEQ(eqModule, dataPart: string) {
          // etc
          }
          

          Free HISE Bootcamp Full Course for beginners.
          YouTube Channel - Public HISE tutorials
          My Patreon - HISE tutorials

          C SimonS Matt_SFM 4 Replies Last reply Reply Quote 2
          • C
            clevername27 @David Healey
            last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • C
              clevername27 @David Healey
              last edited by

              @d-healey That did it! Thanks!!!!!

              David HealeyD 1 Reply Last reply Reply Quote 0
              • David HealeyD
                David Healey @clevername27
                last edited by

                @clevername27 There's a good doc for it, and I have a video on the way

                https://docs.hise.audio/scripting/scripting-in-hise/additions-in-hise.html#type-safety

                Free HISE Bootcamp Full Course for beginners.
                YouTube Channel - Public HISE tutorials
                My Patreon - HISE tutorials

                C 1 Reply Last reply Reply Quote 2
                • SimonS
                  Simon @David Healey
                  last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • C
                    clevername27 @David Healey
                    last edited by

                    @d-healey Of course you do. 💯

                    1 Reply Last reply Reply Quote 0
                    • C clevername27 marked this topic as a question on
                    • C clevername27 has marked this topic as solved on
                    • Matt_SFM
                      Matt_SF @David Healey
                      last edited by

                      @d-healey Type safety. I can't believe I spend half of my time in the docs and missed this particular chapter 🤦
                      Thank you!

                      Develop branch
                      Win10 & VS17 / Ventura & Xcode 14. 3

                      David HealeyD 1 Reply Last reply Reply Quote 2
                      • David HealeyD
                        David Healey @Matt_SF
                        last edited by

                        @Matt_SF it's a fairly recent addition

                        Free HISE Bootcamp Full Course for beginners.
                        YouTube Channel - Public HISE tutorials
                        My Patreon - HISE tutorials

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

                        14

                        Online

                        2.1k

                        Users

                        13.0k

                        Topics

                        113.2k

                        Posts