Error message correction: GUIOff()

Started by RickJ, Fri 18/04/2003 03:49:15

Previous topic - Next topic

RickJ

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.  :)    

Pumaman

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 :)

Spyros

That could be confusing for new users.

Erica McLane

I agree, but it will be harder for  Chris to browse the whole source code and then rename all the InterfaceOn functions to GUIOn.

Pumaman

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.

SMF spam blocked by CleanTalk