Help with TYPES. Pulling hair here.

Blitz3D Forums/Blitz3D Programming/Help with TYPES. Pulling hair here.

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.

Or you can fake it this way:
They work well.

Type bombfields
	Field radius
End Type

Type playerfields
	Field name$
End Type

Type thing
	Field x#,y#,speedx#,speedy#
	
	;only one of these is not null
	Field p.playerfields
	Field b.bombfields
End Type


tp.thing=New thing
tp\p=New playerfields
tp\p\name="joe"


tb.thing=New thing
tb\b=New bombfields
tb\b\radius=22

typetype = 2

Select typetype
	
	Case 1
		
		this.thing = tp
		
	Case 2
		
		this.thing = tb
		
End Select


this\x=this\x+this\speedx
this\y=this\y+this\speedy