HISE Logo Forum
    • Categories
    • Register
    • Login

    Warning: undefined parameter 0

    Scheduled Pinned Locked Moved General Questions
    7 Posts 5 Posters 196 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.
    • orangeO
      orange
      last edited by orange

      The below structure gives: Warning: undefined parameter 0.

      Is this a bug or am I missing something here?

      // Faders
      const arrayed_OutputFader = [];
      
      for (i = 0; i < 2; i++)
      {
          arrayed_OutputFader.push(Content.getComponent("OutputFader" + i));
          arrayed_OutputFader[i].setControlCallback(onarrayed_OutputFaderControl);
      }
      

      NOTE: OutputFader0 & OutputFader1 are the sliders.

      develop Branch / XCode 13.1
      macOS Monterey / M1 Max

      Matt_SFM LindonL dannytaurusD d.healeyD 4 Replies Last reply Reply Quote 0
      • Matt_SFM
        Matt_SF @orange
        last edited by

        @orange did you defined the CB elsewhere ? :

        const arrayed_OutputFader = [];
        
        for (i = 0; i < 2; i++)
        {
            arrayed_OutputFader.push(Content.getComponent("OutputFader" + i));
            arrayed_OutputFader[i].setControlCallback(onarrayed_OutputFaderControl);
        }
        
        inline function onarrayed_OutputFaderControl(component, value)
        {
        	Console.print("Something is missing... :)");
        }
        

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

        1 Reply Last reply Reply Quote 0
        • LindonL
          Lindon @orange
          last edited by

          @orange said in Warning: undefined parameter 0:

          The below structure gives: Warning: undefined parameter 0.

          Is this a bug or am I missing something here?

          // Faders
          const arrayed_OutputFader = [];
          
          for (i = 0; i < 2; i++)
          {
              arrayed_OutputFader.push(Content.getComponent("OutputFader" + i));
              arrayed_OutputFader[i].setControlCallback(onarrayed_OutputFaderControl);
          }
          

          NOTE: OutputFader0 & OutputFader1 are the sliders.

          I think this is anew "feature" of HISE - it warns you when you haven't declared/defined the call back itself...as Matt suggests...

          HISE Development for hire.
          www.channelrobot.com

          orangeO 1 Reply Last reply Reply Quote 0
          • dannytaurusD
            dannytaurus @orange
            last edited by

            @orange Is there a line number shown with the error message?

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

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

              @orange said in Warning: undefined parameter 0:

              undefined parameter 0

              That's telling you that the first parameter that you are passing to a function -- the thing in () -- is undefined.

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

              orangeO 1 Reply Last reply Reply Quote 0
              • orangeO
                orange @Lindon
                last edited by orange

                @Matt_SF @Lindon
                Yes, it gives this error when there is no callback, as you said.

                develop Branch / XCode 13.1
                macOS Monterey / M1 Max

                1 Reply Last reply Reply Quote 0
                • orangeO
                  orange @d.healey
                  last edited by

                  @d-healey said in Warning: undefined parameter 0:

                  @orange said in Warning: undefined parameter 0:

                  undefined parameter 0

                  That's telling you that the first parameter that you are passing to a function -- the thing in () -- is undefined.

                  Makes sense :) But it wouldn't warn previously


                  @dannytaurus said in Warning: undefined parameter 0:

                  @orange Is there a line number shown with the error message?

                  Yes the code that I shared above is the dedicated line.

                  develop Branch / XCode 13.1
                  macOS Monterey / M1 Max

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

                  15

                  Online

                  1.8k

                  Users

                  11.9k

                  Topics

                  103.8k

                  Posts