Types problem

Blitz3D Forums/Blitz3D Programming/Types problem

If you want to return a type then you must define the function like this...
Function PitchYaw2Vector.subdivvect(p#, y#)
	res.subdivvect = New subdivvect
	res\x#=Sin#(y#)+Cos#(y#)
	res\y#=1
	res\z#=Cos#(y#)-Sin#(y#) 
	res\x#=res\x#
	res\y#=res\y#*Cos#(p#)-res\z#*Sin#(p#)
	res\z#=res\y#*Sin#(p#)+res\z#*Cos#(p#)
	Return res
End Function