Array of type handles

BlitzMax Forums/BlitzMax Beginners Area/Array of type handles

I'm getting this error when I compile the code:

BlitzMax Application
Compile Error
Syntax error in user defined type declaration
[OK]

and places the cursor on this line:
	Field ver[9]:vertex



Global entities=0
Type Entity
	Global list:tlist=CreateList()
	Field id
	Field vertex_count

	Method Scale(x#,y#,z#)
		'find center (average xyz of the vertecies)
		Local avgx#=0,avgy#=0,avgz#=0
		For scal=1 To vertex_count
			avgx:+ver[scal].x
			avgy:+ver[scal].y
			avgz:+ver[scal].z
		Next
		avgx:/vertex_count
		avgy:/vertex_count
		avgz:/vertex_count
		'scale it
		For scal=1 To vertex_count
			ver[scal].x=((ver[scal].x-avgx)*x)+avgx
			ver[scal].y=((ver[scal].x-avgy)*y)+avgy
			ver[scal].z=((ver[scal].x-avgz)*z)+avgz
		Next
	End Method
	
End Type

Type Cube Extends Entity
	Field ver[9]:vertex
	Field trig[13]:tri
	
	Function Create:Cube(x#,y#,z#)
		Local s=1,sx=0,sy=0,sz=0
		c:Cube=New Cube
		ver[1]=vertex.Create(s+sx,s+sy,s+sz)
		ver[2]=vertex.Create(s+sx,-s+sy,s+sz)
		ver[3]=vertex.Create(-s+sx,s+sy,s+sz)
		ver[4]=vertex.Create(-s+sx,-s+sy,s+sz)
		ver[5]=vertex.Create(s+sx,s+sy,-s+sz)
		ver[6]=vertex.Create(s+sx,-s+sy,-s+sz)
		ver[7]=vertex.Create(-s+sx,s+sy,-s+sz)
		ver[8]=vertex.Create(-s+sx,-s+sy,-s+sz)
		trig[1]=tri.Create(ver[4],ver[3],ver[2])
		trig[2]=tri.Create(ver[1],ver[3],ver[2])
		trig[3]=tri.Create(ver[6],ver[7],ver[8])
		trig[4]=tri.Create(ver[7],ver[6],ver[5])
		trig[5]=tri.Create(ver[4],ver[8],ver[7])
		trig[6]=tri.Create(ver[4],ver[3],ver[7])
		trig[7]=tri.Create(ver[5],ver[6],ver[2])
		trig[8]=tri.Create(ver[5],ver[1],ver[2])
		trig[9]=tri.Create(ver[5],ver[3],ver[1])
		trig[10]=tri.Create(ver[7],ver[3],ver[5])
		trig[11]=tri.Create(ver[8],ver[6],ver[2])
		trig[12]=tri.Create(ver[4],ver[8],ver[2])
		c.vertex_count=8
		entities:+1;c.id=entities
		Return c:Cube
	End Function
	
End Type