Forum

    • Register
    • Login
    • Search
    • Categories

    Possibility to do Multi-Dimensional Arrays?

    Scripting Forum
    2
    6
    186
    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.
    • Alex Paradis
      Alex Paradis last edited by

      Hi,

      Is there a way to create a Two or more dimensional Arrays?
      Example:
      var test = Array;
      test[1][param1] = value1_1;
      test[1][param2] = value1_2;
      test[1][param3] = value1_3;
      test[2][param1] = value2_1;
      test[2][param2] = value2_2;
      test[2][param3] = value2_3;

      Is there a workaround using an Object instead?

      Dan Korneff 1 Reply Last reply Reply Quote 0
      • Dan Korneff
        Dan Korneff @Alex Paradis last edited by

        @Alex-Paradis I just used a 2D array yesterday. No problems here

        Dan Korneff - Producer / Mixer / Audio Nerd

        Alex Paradis 1 Reply Last reply Reply Quote 0
        • Alex Paradis
          Alex Paradis @Dan Korneff last edited by

          @dustbro
          How did you wrote it?

          Here's my code:

          var previousButtons = Array;
          previousButtons['11']['1'] = "F";
          

          Everytime I get this error :
          Main Script:! Line 80, column 23: Cannot assign to this expression! {TWFpbiBTY3JpcHR8fDIyODl8ODB8MjM=}

          Dan Korneff 2 Replies Last reply Reply Quote 0
          • Dan Korneff
            Dan Korneff @Alex Paradis last edited by

            @Alex-Paradis

            HiseSnippet 734.3ocsU01SaCCD1tzLs1sNMj1Ofn9ohTGjTdYSBMMf9xT0FP0ZGZRHDx33RsHwNxwAnZZ+m2+fsyIARKDPPkVjhTu6dtqO97ycYfRRYQQREBWYzzPFB+ZqgSE5IsmP3BT+NH7ar1mDoYJ6TW6MMjDEw7PX7Rew3.WoLJ44OedOhOQPY4tPnijbJ6a7.tN26fc9J22uGwiMhGLC5M1oOUJZK8kw.eVxxAERnWPNmc.w.qjEB+htdbsTMTSzrH.ydRuoCmHuRjh+HdD+LelwvEMDJTpaT6IbeuA2bViPHb4A4m7kRO4uyZetG+V+4cf2lDvNOiY6A3RySoxyQI2GhR8j9dlB7.zCOC8JmRuksFRU7PcdDC2dkUeAb4Ll.s8YoUJVTo.rUaIfPnWMfbAqmBLtMiFa43zzdSGmU1tV0ZUglej19RhxdWkhL009S1GWmTuY8yfWJ75U+jsuGrVFXtMa0b8labxcpynqjcNMAkATZUalkVJ10VydDCPSR.wEdrqqUEXbjzmsZnhKzMxKxwNmbbqSVY6wwBplKE1RwARM6PQiUp9qpUp96p12Mz3wEFyzSTReelpvvFco5wRrgHN3LlpIbJ8iY2BDtrlWM7hmlZfldEMCPonufqOLjkYmqWbKPufxtige8i9cHZhQBk4CvExTZtgN3NrKg4wTAUEqNrnKzxPXh7dpMPyK8h8I54GDLS7YAf9wbJNipRDw0SmcivyX5vovoiBOsOQ5tr0.tlNoX9Vp.9Bcs+27MaWSMqtiGyn5bxV1p2OWzEKOCp7cYrlKNeehVwuFgsNHNXHrtkx.lHDLe3OxBWxnnRscL1lNyPlvKw3uvSVPWiMNKn6MAQADpRdJMcRwrM6kId.NIRVjWA9hBXa6hRldf7rbV0AE.KYOkRMsh2Cbu3bZs.4r9BjyFKPNat.4r0BjyGVfb93ili46a6FqkAoiIfiAcSVifwcEDPkknHQ+CDOfy7I

            Dan Korneff - Producer / Mixer / Audio Nerd

            1 Reply Last reply Reply Quote 0
            • Dan Korneff
              Dan Korneff @Alex Paradis last edited by

              @Alex-Paradis I'm not 100% on how to create an empty 2D Array, but first thing is:

              var previousButtons = [];
              

              will create an Array. Lets see if we can figure out the rest.

              Dan Korneff - Producer / Mixer / Audio Nerd

              Alex Paradis 1 Reply Last reply Reply Quote 0
              • Alex Paradis
                Alex Paradis @Dan Korneff last edited by

                @dustbro

                I tried your Snippet and I wasn't typing well the arrays.

                All good and working!

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

                7
                Online

                1.1k
                Users

                7.0k
                Topics

                64.6k
                Posts