Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: RickJ on Fri 18/04/2003 03:49:15

Title: Error message correction: GUIOff()
Post by: RickJ on Fri 18/04/2003 03:49:15
Compiled GUIOff() without any parameters.  The error message refers to the old InterfaceOff() function instead of the newer GUIOff() function.   This is one of those things that's harder to know about than it is to fix.  Since I have come across it, I thought I would take the time to make note of it for the benefit of all.  :)    
Title: Re:Error message correction: GUIOff()
Post by: Pumaman on Fri 18/04/2003 14:36:42
Actually this is not trivial to fix.

I'll let you in on a little secret - internally, AGS still uses InterfaceOff/On, and they are still the actual names of the script functions.

GUIOff and GUIOn are simply #defined into every script, to map back to InterfaceOff/On. So if there's a compile error, it's looking at the post-preprocessed version of the script.

Just ignore it :)
Title: Re:Error message correction: GUIOff()
Post by: Spyros on Fri 18/04/2003 15:08:41
That could be confusing for new users.
Title: Re:Error message correction: GUIOff()
Post by: Erica McLane on Fri 18/04/2003 16:00:00
I agree, but it will be harder for  Chris to browse the whole source code and then rename all the InterfaceOn functions to GUIOn.
Title: Re:Error message correction: GUIOff()
Post by: Pumaman on Fri 18/04/2003 16:17:13
It could be confusing to new users, I concede.

Howver, it is very rare that anyone will get this message - the message RickJ refers to is "Incorrect number of parameters in call to InterfaceOff" - which will only happen if you do something like:

GUIOff();
or
GUIOff(5, 3, 6);

As Erica says, to fix this one cosmetic glitch in a single error message would take me far more time than is worth it.