Types problem

Blitz3D Forums/Blitz3D Beginners Area/Types problem

car is the TYPE of the variable c, t, whatever, the TYPE is global as is the type list, but the variable which refers to that type (in this instance) is local it's just being used to point to each type in the type list.

a quick demo:
Type car
	Field x
End Type

c.car = New car
	c\x = 1

;Global flobby.car = New car <- uncomment this line and flobby becomes global

MakeNewCar(43)

Print flobby\x ;if above line is not uncommented, this will cause an error 
			   ;since flobby is Not of Type car except locally inside the Function below

WaitKey()
End

	
Function MakeNewCar(CarNum)
	Flobby.car = New car
		Flobby\x = CarNum
End Function