HISE Logo Forum
    • Categories
    • Register
    • Login

    Error Help?

    Scheduled Pinned Locked Moved Scripting
    10 Posts 3 Posters 73 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.
    • ChazroxC
      Chazrox
      last edited by Chazrox

      Sometimes when I copy paste a code block into a namespace, it gives me this error. When I take it back out of the namespace the error still persists even though it worked before putting it into the namespace in the first place. I notice this happens when copy/pasting stuff around my scripts. How do I reset this? Sometimes when I just rewrite the codeblock from scratch it will work again and sometimes it just keeps giving me this pesky error message. Please advise 🙏 Screenshot 2025-05-12 at 5.25.18 PM.png

      I've re-written the 'for loop' with and without brackets and both ways still gives me an error. I can just rewrite the whole thing but I dont want to do this everytime I copy/paste something.

      In namespace, same error:
      Screenshot 2025-05-12 at 5.37.04 PM.png

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @Chazrox
        last edited by

        @Chazrox Your namespace has the same name as your variable, that will cause an issue

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        ChazroxC 1 Reply Last reply Reply Quote 2
        • ChazroxC
          Chazrox @d.healey
          last edited by

          @d-healey that was it. 🙏

          d.healeyD 1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @Chazrox
            last edited by d.healey

            @Chazrox As a naming convention, use camel case with all words starting with an uppercase letter for namespaces, for example MyNamespace.

            For variables and functions use camel case with the first word starting with a lower case letter and the rest having uppercase, for example myFunction or lafComboBoxSampleMaps.

            Be consistent and you'll avoid a lot of little bugs.

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            ChazroxC 2 Replies Last reply Reply Quote 1
            • ChazroxC
              Chazrox @d.healey
              last edited by

              @d-healey Crucial info. Thank you!

              LindonL 1 Reply Last reply Reply Quote 0
              • ChazroxC
                Chazrox @d.healey
                last edited by

                @d-healey What about naming namespaces and the .js file? I always name the .js file the same as the namespace. Is that correct?

                d.healeyD 1 Reply Last reply Reply Quote 0
                • LindonL
                  Lindon @Chazrox
                  last edited by

                  @Chazrox I always name the namespaces with the word Space in there, so

                  FilterSpace
                  EnvelopeSpace

                  etc.

                  HISE Development for hire.
                  www.channelrobot.com

                  ChazroxC 1 Reply Last reply Reply Quote 1
                  • ChazroxC
                    Chazrox @Lindon
                    last edited by

                    @Lindon Ah. I like that one. 👍 Thanks.

                    1 Reply Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @Chazrox
                      last edited by

                      @Chazrox said in Error Help?:

                      Is that correct?

                      That's what I do.

                      You might want to read this document I wrote a while back - https://docs.hise.dev/scripting/scripting-in-hise/hise-script-coding-standards.html

                      Libre Wave - Freedom respecting instruments and effects
                      My Patreon - HISE tutorials
                      YouTube Channel - Public HISE tutorials

                      ChazroxC 1 Reply Last reply Reply Quote 1
                      • ChazroxC
                        Chazrox @d.healey
                        last edited by

                        @d-healey I'll read this for sure. Thank you.

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

                        40

                        Online

                        1.7k

                        Users

                        11.8k

                        Topics

                        102.8k

                        Posts