I'm guessing that you're trying to create user-defined routines without return values so that you can call them as commands, like:
DEF ROUTINE(X,Y)
...
END DEF
ROUTINE(A,B)
A function with arguments has to return a value. Read the doc for user-defined functions carefully, or post a screenshot of your code so we can see what's up.
That's exactly what I've been doing (minus the END DEF, which I believe is wrong). I couldn't even get the doc's examples to work. I did manage to get them working with the DEF FUNC ARG1,ARG2,... OUT X,Y,... definition but it forces me to write the return value to a variable.
Hang on, I was wrong!
If you define your function like this:
DEF FUNC A,B
...
END
And call it like this:
FUNC A,B
It should work. Note the lack of parentheses; I think that was where the problem was.
Thank goodness. That's much more useful.