Hey Guys,
I have a problem with types being passed into a function.
For some reason, the code below is not working..
Am I doing something wrong ?
TYPE Animation
currentFrame AS INTEGER
ENDTYPE
GLOBAL walking AS Animation
walking.currentFrame = 8
DO
AddToAnimation(walking)
TEXT 20,20,STR$(walking.currentFrame)
LOOP
FUNCTION AddToAnimation(Animation)
Animation.currentFrame = Animation.currentFrame + 1
ENDFUNCTION
The above code is not part of the application but an example that illustrates my problem.
If im passing the type variable to the function and performing calculations on one of it's type members it doesn't actually change it. The above example will always output the number 8
Any suggestions ?