Arrays in User-Types

BlitzMax Forums/BlitzMax Programming/Arrays in User-Types

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Im a little puzzled by the use of arrays within usertypes. Heres the code:

Type Vec
Field x:Float
Field y:Float
Field z:Float
Field w:Float
End Type

Type DispPos
Field d:Vec[255]
End Type

Type Spline
Field dispmap:DispPos[255]
Field knot:Vec[255]
End Type

Global sp:Spline = New Spline

My problem comes when trying to access the fields within the arrays - I always get an error informing me the Field or Method is null.

this breaks:
sp.knot[0].x = 10
sp.dispmap[0].d[0].x = 10

Do the arrays of usertypes need to be 'newed' also? I have tried such an implementation and still couldnt access the fields.

Any assistance would be greatly appreciated.