Hi all!
I've had a problem, I was trying to add a call to a function, say on mouse click. The function i have called runs, but if certain conditions are met a call back to on mouse click may be required.
The problem is, if my customs function is defined above the on mouse click function I get an undefined token error when I try to compile, or if the on mouse click is defined first I get an undefined symbol error.
Is there a way to do this? I didn't find much in the Wiki apart from scripting for absolute beginners.
I have programmed in other OO languages before, and it seems alien to me that a function must be defined before it is referenced anywhere else in the script. Of course it should be defined before a call to it is executed however. Unless I have totally missed something
I was hoping someone could point me towards the solution and enlighten me to the best practice for where to put my custom scripts.
Thanks in advance to anyone that can help me.
Andrew.
I've had a problem, I was trying to add a call to a function, say on mouse click. The function i have called runs, but if certain conditions are met a call back to on mouse click may be required.
The problem is, if my customs function is defined above the on mouse click function I get an undefined token error when I try to compile, or if the on mouse click is defined first I get an undefined symbol error.
Is there a way to do this? I didn't find much in the Wiki apart from scripting for absolute beginners.
I have programmed in other OO languages before, and it seems alien to me that a function must be defined before it is referenced anywhere else in the script. Of course it should be defined before a call to it is executed however. Unless I have totally missed something

I was hoping someone could point me towards the solution and enlighten me to the best practice for where to put my custom scripts.
Thanks in advance to anyone that can help me.
Andrew.