I have a function that calls another function. No biggie. The thing that's happening is that the function being called (we'll call it showStuff()) is being run before the lines of code inside the caller function (we'll call it callStuff()) are executed. Simplified, when we run callStuff,
trace("This is a trace statement.");
trace("I am a dog.");
it is giving us an output of:
I am a dog.
This is a trace statement.
Notice the mix-up of order here.
As far as I can tell, this is an issue with a bug in the compiler; perhaps there is something that decides when a function is run in relation to another of which I am unaware....but I've tried moving both functions up and down inside my code, but it is always executing the called function before it executes lines of code that precede its call inside the caller function, when the variables used are not ready, which then messes up my results...and my output. Why?
What other possibilities can I consider that it might be? The only thing I can think of afte examining it for a day is that it must be an issue the compiler has and I just need to work around it (I've had that before....).