Syntax Help with types in arrays

BlitzMax Forums/BlitzMax Beginners Area/Syntax Help with types in arrays

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.

Hi. This is bugging me. Please Help! :) Why can't I do this? I want to be able to put items into the array 'points' - without having to do a 'pl[1]=New pt' previous to every entry. I have used this syntax with other types (in Box2D) and it works ok. Must be doing something simple wrong. Thanks.

Global pl:pt[]=New pt[10]

Type pt
	Field x:Int,y:Int
End Type

pl:pt[1].x=7
End


If I use the above syntax, I get a null object error.