Jump to content

Array Help


sandyd
 Share

Recommended Posts

Hi all,

I'm feeling a bit stupid here, but here goes:

If I have the following statement

$Tile[19] = StringSplit('20,28,27,18,10,11',',')

I want to access the value 27, so I try MsgBox(0,'',$Tile[19][3])

I get the following error message:

Array variable has incorrect number of subscripts or subscript dimension range exceeded.

How would I go about accessing that value WITHOUT creating another variable to hold the value?
----[ SandyD ]---
Link to comment
Share on other sites

hi,

Not possible, i believe; that is why I made Array2D.au3; eg

;tileArray.au3
#include <Array2D.au3>
global $ar1_Array_Strings[3]
$ar1_Array_Strings[0] = '00,08,07,08,00,01'
$ar1_Array_Strings[1] = '90,98,97,98,90,91'
$ar1_Array_Strings[2] = '20,28,27,18,10,11'
$Tile=_Array2DCreateFromArraySt($ar1_Array_Strings, 0, 0,",")
MsgBox(0,"","="&$Tile[2][2])
;~ $Tile[19] = StringSplit('20,28,27,18,10,11',',')
Best, Randall
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...