mrbig1479 Posted July 1, 2008 Share Posted July 1, 2008 hey i have the following scriptGlobal $data1=45 Global $data2=400 Global $PRICE[$data1][$data2][3] now i do all kind of staff in the script and in the end i want to do something like this Global $PRICE[$data1][$data2][0] = $whatever0 Global $PRICE[$data1][$data2][1] = $whatever1 Global $PRICE[$data1][$data2][2] = $whatever2but i get this errorSubscript used with non-Array variable.:an i missing something here?thanks Link to comment Share on other sites More sharing options...
LarryDalooza Posted July 1, 2008 Share Posted July 1, 2008 Global $Array[3] creates an array as... $Array[0] $Array[1] $Array[2] so... $Array[3] is out of bounds... AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
cartman380 Posted July 1, 2008 Share Posted July 1, 2008 In other words your array can't have 45 and 400 as the numbers, you'll have to do $data1 - 1 and $data2 - 1Global $PRICE[$data1-1][$data2-1][0] = $whatever0 Global $PRICE[$data1-1][$data2-1][1] = $whatever1 Global $PRICE[$data1-1][$data2-1][2] = $whatever2 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now