Forum
    • Categories
    • Register
    • Login

    Script Processor: "not a function" error is intermittent/non-deterministic (4.1.0)

    Scheduled Pinned Locked Moved Scripting
    3 Posts 3 Posters 20 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.
    • M
      musicayciencia
      last edited by

      I am using HISE 4.1.0, Windows standalone. Please see below my case:

      getGlobalVariable turned out to need array syntax (getGlobalVariable[i]), not function-call syntax (getGlobalVariable(i)) — that part makes sense once found.

      The real issue: the compiler is intermittent. The exact same, unmodified line sometimes compiles fine and sometimes throws "This expression is not a function!" — I've seen this happen even to setGlobalVariable(...) calls (which are correctly function-style). Recompiling with no code change sometimes clears the error, sometimes doesn't. It's happened in a fresh, minimal project too (not just a long-edited one), so it doesn't seem to be project corruption.

      Minimal repro that has failed intermittently for me:

      function onNoteOn()
      {
      setGlobalVariable(2, 1);
      setGlobalVariable(1, 0);
      }

      in a Script Processor inside a Sampler's MIDI chain.

      Is this a known issue with this build? Anything I should check (JUCE/compiler version, a setting, etc.) before assuming it's just flaky?

      dannytaurusD David HealeyD 2 Replies Last reply Reply Quote 0
      • dannytaurusD
        dannytaurus @musicayciencia
        last edited by dannytaurus

        @musicayciencia First thing you should do is build HISE form the source.

        Ignore the Releases section on GitHub - 4.1.0 is far too old to spend any time debugging it.

        Follow the "How to Compile HISE" details further down the repo page.

        Meat Beats: https://meatbeats.com
        Klippr Video: https://klippr.video

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

          @musicayciencia setGlobalVariable() isn't a HISE function, or is it a function you created? Either way, you should avoid global variables if you can.

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

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

          19

          Online

          2.4k

          Users

          13.9k

          Topics

          120.9k

          Posts