First of all: Is there no way to search through this forum???
Second: How do I make a function with user defined data types and/or arrays?
This is not working (compiler error):
TYPE XYZValue
x AS FLOAT
y AS FLOAT
z AS FLOAT
ENDTYPE
TYPE Player
pos AS XYZValue
size AS XYZValue
points AS BYTE
ENDTYPE
TYPE Ball
pos AS XYZValue
dir AS XYZValue
ENDTYPE
DIM player(2) AS Player
player(1).pos.x = 1
player(1).pos.y = 2
player(1).pos.z = 3
player(2).pos.x = 3
player(2).pos.y = 2
player(2).pos.z = 1
ball AS Ball
ball.pos = copyXYZValue(ball.pos, player(1).pos)
Function copyXYZValue(firstVal AS XYZValue, secondVal AS XYZValue)
firstVal.x = secondVal.x
firstVal.y = secondVal.y
firstVal.z = secondVal.z
EndFunction firstVal
I get errors if I try to give an array to a function, too. How do I declare a function to be able to give it a complete array as parameter?
I am using the 30 days trial. Any ideas?