Well, you're just passing in an integer (accelerate_timer or decelerate_timer), so in order to pass that in you would have to define the function like this:
But I see that you want to change the field value of the type, so this is not the way to do it. (The value would be forgotten once you returned from the function.) What you should do is this:
...and to call it:
Something like that. There are numerous ways to end up doing what you want. This is the one closest (probably) to what you were thinking.
function set_timer (thetimer%)(The % is optional.)
But I see that you want to change the field value of the type, so this is not the way to do it. (The value would be forgotten once you returned from the function.) What you should do is this:
Function set_timer(c.car, decelerate) If decelerate then c\decelerate_timer = Millisecs() Else c\accelerate_timer = Millisecs() Endif End Function
...and to call it:
set_timer(blue, 0) ; Accelerate set_timer(blue, 1) ; Decelerate
Something like that. There are numerous ways to end up doing what you want. This is the one closest (probably) to what you were thinking.