Forum
    • Categories
    • Register
    • Login

    Namespace in included file is not available

    Scheduled Pinned Locked Moved Scripting
    7 Posts 2 Posters 607 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.
    • SimonS
      Simon
      last edited by

      I have some constants declared in a namespace, which are in a file that gets included at the top of my script.

      For some reason these constants are not available in one particular function.

      If I declare these constants in the exact same place, but without the namespace, they are available and it works fine.

      I'll investigate more later!

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

        @Simon Could you give a script example?

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

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

          @d-healey Of course, later, was just putting it here so I remember to come back and investigate :)

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

            @Simon Sure, does everything else in that namespace work as expected?

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

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

              @d-healey The constants were the only thing in the namespace, vowel.aa, vowel.ee, vowel.uu, etc.

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

                @Simon were you including the namespace within another namespace?

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

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

                  @d-healey Nope, it's the only namespace in the project and it was just to have some nice prefixes on the constants. It feels like something with variable hoisting but I'll check properly later.

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

                  34

                  Online

                  2.1k

                  Users

                  13.0k

                  Topics

                  113.0k

                  Posts