Sign in to follow this  
Followers 0
sandyd

Array Help

3 posts in this topic

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 ]---

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Hi randallc,

I basically took my array declarations and recreated them as 2d arrays.

Was quicker than trying to find out how to do it.

Thanks anyway


----[ SandyD ]---

Share this post


Link to post
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
Sign in to follow this  
Followers 0