Returning the Complete Array of types

Blitz3D Forums/Blitz3D Programming/Returning the Complete Array of types

how about this?

NOTE : I have changed it to something better

Graphics 800,600,32,2 
SetBuffer BackBuffer()

Type Car_type 
	Field wheels 
End Type 

Type Race_type
	Field car.car_type[10]
	Field count
End Type

Dim race.Race_type(10)

For i=1 To 10 
	race(i) = New Race_Type
	race(i)\count=Rand(10)
	
	For h=1 To race(i)\count
		race(i)\car.car_type[h] = New car_type		
		race(i)\car[h]\wheels=Rand (4) 
	Next 
Next 

For m=1 To 10 
	Print "Stats for race "+m
	For n=1 To race(m)\count
		Print "  Car "+n+" has "+race(m)\car[n]\wheels+" wheels"
		Delay 50
	Next 
Next
waitkey
end


I think this is what i am going to be using in my game. Tis the first time I have used types within types but it looks like it will save me a lot of hassle.