How to create and array of a type?

BlitzMax Forums/BlitzMax Beginners Area/How to create and array of a type?

LeeFbx(Posted 2007) [#1]
I am trying to create an array of RGB triplets but can't seem to find the right syntax.
I am complete new to OOP concepts.

Below is what I am trying but I get
compiler error: expecting identifyer but encountered "="

Type RGB_Col
Field Red%
Field Grn%
Field Blu%
End Type

Global C[6] Type = RGB_Col

For i = 0 To 5
C[i] = New RGB_Col
Next

Any help would be appreciated.

Thank you,
-Lee


tonyg(Posted 2007) [#2]
Type RGB_Col
	Field Red%
	Field Grn%
	Field Blu%
End Type

Global C:rgb_col[6]

For i = 0 To 5
C[i] = New RGB_Col 
Next



LeeFbx(Posted 2007) [#3]
Thanks. That did it.

-Lee