Figured it should be posted here -_-
function RenderVectorModel(Model as VectorMap, ParamCount, X, Y, Angle)
for I = 0 to (ParamCount - 1)
ink rgb(255,0,0),0
line X, Y, X - (cos(Angle) * Model(I).Distance), Y - (sin(Angle) * Model(I).Distance
next I
endfunction
When called like this:
RenderVectorModel(TestModel,1, 320,240, Angle)
it gives the error:
Quote: "Variable 'Model' does not exist on line 24."
Which is the the line where the LINE function sits..
This is how TestModel is created:
dim TestModel(2) as VectorMap
Any ideas? I think I got a little too much C++ in my blood
If I've got it all wrong.. is there a straight-foward way to use dynamic arrays? I was hoping I wouldn't have to go memblock crazy again
Dark Basic Professional