Returning the Complete Array of types

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

If I get what you're trying to say (or indeed is saying :), then you need to go about it another way. Either create a multidimensional array, or do it like this:
Graphics 800,600,32,2 
SetBuffer BackBuffer() 
Type Car_type 
	Field wheels 
End Type 
Type Race_type
	Field car.car_type[100]
End Type
Dim race.Race_type(10)
For i=1 To 10 
	race(i) = New Race_Type
	For h=1 To 3 
		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 100
		If Not (race(m)\car[n] = Null)
			Print "  Car "+n+" has "+race(m)\car[n]\wheels+" wheels"
			Delay 100 
		End If
	Next 
Next
Multidimensional array variant:
Graphics 800,600,32,2 
SetBuffer BackBuffer() 
Type Car_type 
	Field wheels 
End Type 
Dim race.car_type(10,3) ;10 races, 3 cars in each
For i=1 To 10 
	For h=1 To 3 
		race(i,h) = New car_Type
		race(i,h)\wheels=Rand (4) 
	Next 
Next 

For m=1 To 10 
	Print "Stats for race "+m
	For n=1 To 3
		If Not (race(m,n) = Null)
			Print "  Car "+n+" has "+race(m,n)\wheels+" wheels"
			Delay 100 
		End If
	Next 
Next
Fredborg