Flaky Posted December 20, 2012 Posted December 20, 2012 (edited) ;Copy the [n][3] ObjectTable from the class properties local $aObjectTable = $oSelf.ObjectTable ;Determine [n] local $iElements = UBound($aObjectTable,1) ;Debug script - Output says 1 row, 3 columns (which is correct, in this instance) If IsArray($aObjectTable) Then MsgBox(0, "AnnihilateElements", "Still an array" & @CRLF & "Rows: " & $iElements & @CRLF & "Columns :" & UBound($aObjectTable, 2)) ;Store object from first column of table (These next three lines cause the error) local $oObject = $aObjectTable[0][0] local $sGUID = $aObjectTable[0][1] local $hObj = $aObjectTable[0][2] According to the called MsgBox, the array is one row and three columns in size (as expected). According to UBound($aObjectTable, 0), it is only one dimensional. If I address $aObjectTable as a one dimensional array, it throws an out-of-bounds array index error. Any suggestions? Edited December 20, 2012 by Flaky
kylomas Posted December 20, 2012 Posted December 20, 2012 (edited) Flaky, 1 - "Subscript used without an array variable" and "out-of-bounds array index error" are two different problems. Which is it? 2 - What is $oSelf.ObjectTable? If it is an object then $aObjectTable becomes an object and amy need to be iterated differently (for... in...next...) 3 - Without runnable code it is difficult to provide any specific help. kylomas edit: syntax Edited December 20, 2012 by kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill
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