show_message

Displays a pop-up message.

Syntax:

GML Code Example

show_message(str);


Argument Description
str The string to show in the pop-up message.


Returns: N/A


Description

This function creates a pop-up message box which displays the string defined in the code and a button marked "Ok" to close it.

NOTE: THIS FUNCTION IS FOR DEBUG USE ONLY.


Example:

GML Code Example

var i, tot;
 tot = 0;
 for (i = 0; i < 10; i += 1)
    {
    tot += inv[i];
    }
 show_message("Total = " + string(tot));
 

The above code will loop through the values stored in the array "inv" and add them to the variable "tot" before showing a message with the total.


Back: Debugging



No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here