Bug in calling functions (SOLVED)

Started by Akumayo, Sat 17/06/2006 04:28:19

Previous topic - Next topic

Akumayo

I have a few functions in the top of my script.  Only one of them is imported in the header, because it's the only one that is needed elsewhere in the script.  I call that function in repeatedly_excecute:
Code: ags

...
Display("Some message.");
Display("Some other message.");
My_Function();
...


Now, within the function is a display message:
Code: ags

...
Display("A message.");
}  //<--- this bracket closes the function
...


When I run the game, the two messages in repeatedly_excecute are displayed, but the one that is from the function never shows up.  This is incredibly aggrivating.  Does anyone have a clue of what I'm doing wrong?

Thanks for any help in advance.

-Regards, Akumayo
"Power is not a means - it is an end."

Radiant

At first thought there would be something wrong earlier in My_Function(), either a 'return' statement or some kind of 'if' that causes the Display to be skipped. Try putting a Display at the top of My_Function() and see if that works.


Akumayo

Spot on!  It appears that one of my while statements had a backwards > symbol   :-[

Thanks for the reply, the problem is solved now!  :)
"Power is not a means - it is an end."

SMF spam blocked by CleanTalk