Strict Import "Cell.bmx" Type Grid Local m_aobjGrid:Cell[13, 13] ' Create the grid (instatiate instances of the cell object) Method New() For Local y:Byte = 0 To 12 For Local x:Byte = 0 To 12 m_aobjGrid[y, x] = New Cell Next Next End method End TypeWhen attempting to build the above class, the following line is falling over with a "Syntax error in user defined type declaration":
Local m_aobjGrid:Cell[13, 13]Am I doing something really stupid here? It is 1:51am and I'm tired, so it wouldn't suprise me...
FYI, here's the contents of the "Cell.bmx" file:
Type Cell Field Colour:Byte = 0 Field State:Byte = 0 End TypeNote: I've stripped out the all of the irrelevant functionality in the above (simplified) classes.
Also, how do I determine the number of elements for multi-dimentioned arrays? I.e. For 2d arrays it's [array].Length.
Many thanks.