• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Question - General [SOLVED] Error message design

S

Sam (Deleted User)

Guest
Hey guys, I need a recommendation on how I should do this.

I wrote an error message box for one of my assets, and it works like this:

show_error(str, abort)

It overrides the default GML show_error() but works slightly different. As usual, str is your error message. Abort is whether it is a fatal error.

If fatal is true, appended to the bottom of the message is "Click 'OK' to abort the application." And there is an ok button in which case the return value is always true.

If fatal is false, appended to the bottom of the message is "Do you want to abort the application?" In which case there is a 'Yes' and a 'No' button, returning true if yes is clicked, false otherwise.

Closing the game with the error message is not handled by the extension, I chose not to do that to allow the user to do cleanup code such as freeing dynamically loaded resources and whatnot before closing the game with their own call to game_end().

I particularly do not like this behavior, of having either an OK button for fatal and a question for non-fatal with an unwanted, unmodifyable or otherwise English-only message appended to the error I wrote.

As a clear work around, I could just make the functionality of the error more obvious by changing the dialog's button labels. In particular, I would like to use the 'Abort', 'Retry', 'Ignore' button labels for nonfatal, and simply 'Abort' for fatal. This is much better especially for those players who don't know English well or at all, as singular words commonly used on buttons are easier to pick up what they mean or enter on Google translate than entire messages.

This can easily be done for Windows, and the fatal one will need a Window Hook Procedure to change the single button text to Abort, but it can be done. On Mac is the easiest one to do, NSAlert's are rather simple. On Linux it can be done with Zenity (for GTK+ dialogs) rather easy too.

The only problem is I can't do this with KDialog, which is an alternative on Linux to using Zenity for people who prefer to use KDE for their desktop environment over a GNOME / GTK+ based one.

KDialog is the most limiting of the toolkits I have to work with. The only 3 button dialog option I have is a 'Yes', 'No', 'Cancel' but I can't change the label text. Same goes for the single button for fatal.

Do you guys think I should:

1) Keep things how they are.

2) introduce the Abort, Retry, Ignore: and if so, what should each button's integer return value be? (I'd prefer making it backwards compatible)

3) if you said yes for 2) should I exclude this function from KDialog? Or should I remove KDialog from my extension emtirely, which would allow me to keep my entire extension consistent?

4) if you said no to 3) how should I implement it in KDialog? KDialog's button options can be found here.

Thanks a ton! You hold the key to what I do with the next release of my extension. :)

Edit:

Turns out KDialog does have a way to change button labels. Problem solved.
 
Last edited by a moderator:
Top