Jump to content

Multi-dimensional arrays


ThomQW
 Share

Recommended Posts

Hi,

I need some help initializing a multi-dimensional array. The array is 5 rows and 3 columns. I tried this:

Dim $avArray[5][3] = [ [ "0588749", "70423", "alex169" ], ["0511902", "128987", "arar861"], ["0574334", "414633", "aren473"], ["5623233", "66354", "baker33"], ["0523123", "86149", "bane910"] ]

and I receive the following error:

C:\Program Files\AutoIt3\Include\Array.au3 (666) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:

$t = $array[$i]

$t = ^ ERROR

>Exit code: 1 Time: 0.419

I've tried various alterations with no better results. Can anyone help me, what am I doing wrong?

Thanks in advance!

THOMQW

Link to comment
Share on other sites

Hi,

I need some help initializing a multi-dimensional array. The array is 5 rows and 3 columns. I tried this:

Dim $avArray[5][3] = [ [ "0588749", "70423", "alex169" ], ["0511902", "128987", "arar861"], ["0574334", "414633", "aren473"], ["5623233", "66354", "baker33"], ["0523123", "86149", "bane910"] ]

and I receive the following error:

C:\Program Files\AutoIt3\Include\Array.au3 (666) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:

$t = $array[$i]

$t = ^ ERROR

>Exit code: 1 Time: 0.419

I've tried various alterations with no better results. Can anyone help me, what am I doing wrong?

Thanks in advance!

THOMQW

What is $array? Maybe $avArray[$i][...]?
Link to comment
Share on other sites

I need some help initializing a multi-dimensional array. The array is 5 rows and 3 columns. I tried this:

Dim $avArray[5][3] = [ [ "0588749", "70423", "alex169" ], ["0511902", "128987", "arar861"], ["0574334", "414633", "aren473"], ["5623233", "66354", "baker33"], ["0523123", "86149", "bane910"] ]

and I receive the following error:

C:\Program Files\AutoIt3\Include\Array.au3 (666) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:

$t = $array[$i]

$t = ^ ERROR

>Exit code: 1 Time: 0.419

That error is coming from Array.au3. Open Array.au3 in SciTE and see which function that is at line 666.

And what version are you running? Neither the current Production or Beta versions of Array.au3 have valid code lines at 666, but yours evidently does. Some of the array UDFs have been updated to work with 2D arrays, so maybe you just have an out-of-date UDF.

:D

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...