Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Akumayo on Sat 17/06/2006 04:28:19

Title: Bug in calling functions (SOLVED)
Post by: Akumayo on Sat 17/06/2006 04:28:19
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:

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


Now, within the function is a display message:

...
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
Title: Re: Bug in calling functions
Post by: Radiant on Sat 17/06/2006 07:34:13
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.

Title: Re: Bug in calling functions
Post by: Akumayo on Sat 17/06/2006 17:27:19
Spot on!  It appears that one of my while statements had a backwards > symbol   :-[

Thanks for the reply, the problem is solved now!  :)