Guis not working anymore (Version 3.3.5)

Started by DBoyWheeler, Mon 05/09/2016 17:12:01

Previous topic - Next topic

DBoyWheeler

I recently got ahold of the newer version, but now the things that were NOT giving me problems before are now the things giving me problems.

I'm trying to test out what I have in my project so far, but I keep getting this message.

"Error (line 102): Undefined token 'bSaveGame_OnClick'"

I mean, it worked fine in the earlier version, but now it's acting up.

Here's the current code I have, for the save game button.

Code: ags
function txtSaveGameName_OnActivate(GUIControl *control)
{
  bSaveGame_OnClick(control, eMouseLeft);
}


Prior to getting the updated version, I never had to deal with this issue.

What changes do I need to make to fix things?  What could I be missing?

Crimson Wizard

This simply means that function bSaveGame_OnClick is not declared before it is first used. Search your script for the actual function. If you have it somewhere, make sure it is positioned above all its uses. If it does not exist, you will have to write it... or change the script to not using it.

DBoyWheeler

#2
Quote from: Crimson Wizard on Mon 05/09/2016 17:18:46
This simply means that function bSaveGame_OnClick is not declared before it is first used. Search your script for the actual function. If you have it somewhere, make sure it is positioned above all its uses. If it does not exist, you will have to write it... or change the script to not using it.

So what you're saying is I need to rearrange the order.  I'll try that.

[Update] Hey, you were right!  I just needed to rearrange some of the code and it now is working properly.  Thanks for the help!

SMF spam blocked by CleanTalk