Arma 3 Scripting

Function in GUI

BIS_fnc_guiMessage

Also available as Markdown and JSON, or read the original wiki page.

Description

Displays an interactive message dialog in the center of the screen.

Important

This function internally utilizes suspension (waitUntil to be specific) and therefore has to be executed in a scheduled environment.

Syntax

[message, header, okButton, cancelButton, parent, useParentBox, pause] call BIS_fnc_guiMessage

Parameters:

Returns: Boolean - true if the "OK" button was pressed, otherwise false. Returned only after the message box is closed.

Examples

Example 1

Because this example uses spawn, the return value of BIS_fnc_guiMessage is lost and can not be used.

["Hello World"] spawn BIS_fnc_guiMessage;

Example 2

private _result = ["Are you sure?", "Confirm", true, true] call BIS_fnc_guiMessage;

if (_result) then {
    systemChat "The player is sure.";
} else {
    systemChat "The player is not sure.";
};

See also

BIS_fnc_GUIhint · BIS_fnc_3DENShowMessage · hintC

Community notes

Eden

Calling this function can cause an game crash. When doing this you have to spawn the function or add an spawn around it so you can use the result:

[] spawn
{
    private _result = ["Are you sure?", "Confirm", true, true] call BIS_fnc_guiMessage;
    // Use _result here
};
Demellion

This function only exists along with mission display (findDisplay 46). If this function is called before with -skipIntro parameter enabled (see Arma 3: Startup Parameters) it will result as Void.