{"name":"BIS_fnc_guiMessage","title":"BIS fnc guiMessage","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_guiMessage","revid":379269,"updated":"2026-10-30T23:44:03Z","groups":["GUI"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"effect":"local"},"exec":"call","description":"Displays an interactive message dialog in the center of the screen.\n\n> [!IMPORTANT]\n> This function internally utilizes suspension (waitUntil to be specific) and therefore has to be executed in a scheduled environment.","syntaxes":[{"syntax":"[message, header, okButton, cancelButton, parent, useParentBox, pause] call BIS_fnc_guiMessage","params":[{"name":"message","type":"String or Structured Text","optional":true,"default":"\"\"","description":"message","type_expr":"String | Structured Text","text":"message: String or Structured Text - (Optional, default: \"\") message"},{"name":"header","type":"String","optional":true,"default":"\"\"","description":"header text","type_expr":"String","text":"header: String - (Optional, default: \"\") header text"},{"name":"okButton","type":"Boolean or String","optional":true,"default":"true","description":"Boolean - enable the \"OK\" button\n- String - custom text for the \"OK\" button","type_expr":"Boolean | String","text":"okButton: Boolean or String - (Optional, default true):\n\n- Boolean - enable the \"OK\" button\n- String - custom text for the \"OK\" button"},{"name":"cancelButton","type":"Boolean or String","optional":true,"default":"false","description":"Boolean - enable the \"Cancel\" button\n- String - custom text for the \"Cancel\" button","type_expr":"Boolean | String","text":"cancelButton: Boolean or String - (Optional, default false):\n\n- Boolean - enable the \"Cancel\" button\n- String - custom text for the \"Cancel\" button"},{"name":"parent","type":"Display","optional":true,"default":"`[] call BIS_fnc_displayMission`","description":"parent display","type_expr":"Display","text":"parent: Display - (Optional, default: `[] call BIS_fnc_displayMission`) parent display"},{"name":"useParentBox","type":"Boolean","optional":true,"default":"false","description":"try to use control inherited from \"RscMessageBox\" in parent instead of creating a new one","type_expr":"Boolean","text":"useParentBox: Boolean - (Optional, default: false) try to use control inherited from \"RscMessageBox\" in parent instead of creating a new one"},{"name":"pause","type":"Boolean","optional":true,"default":"true","description":"pause simulation while message dialog is open (no effect in multiplayer)","type_expr":"Boolean","text":"pause: Boolean - (Optional, default: true) pause simulation while message dialog is open (no effect in multiplayer)"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true if the \"OK\" button was pressed, otherwise false. Returned only after the message box is closed."}}],"examples":[{"text":"Because this example uses spawn, the return value of BIS_fnc_guiMessage is lost and can not be used.\n\n```sqf\n[\"Hello World\"] spawn BIS_fnc_guiMessage;\n```","code":["[\"Hello World\"] spawn BIS_fnc_guiMessage;"]},{"text":"```sqf\nprivate _result = [\"Are you sure?\", \"Confirm\", true, true] call BIS_fnc_guiMessage;\n\nif (_result) then {\n    systemChat \"The player is sure.\";\n} else {\n    systemChat \"The player is not sure.\";\n};\n```","code":["private _result = [\"Are you sure?\", \"Confirm\", true, true] call BIS_fnc_guiMessage;\n\nif (_result) then {\n\tsystemChat \"The player is sure.\";\n} else {\n\tsystemChat \"The player is not sure.\";\n};"]}],"see_also":["BIS_fnc_GUIhint","BIS_fnc_3DENShowMessage","hintC"],"notes":[{"user":"AgentRev","date":"2014-06-24T00:43:00Z","text":"Message boxes can be force-closed with:\n\n```sqf\nuiNamespace setVariable [\"BIS_fnc_guiMessage_status\", false];\n```"},{"user":"Eden","date":"2016-01-13T15:16:00Z","text":"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:\n\n```sqf\n[] spawn\n{\n    private _result = [\"Are you sure?\", \"Confirm\", true, true] call BIS_fnc_guiMessage;\n    // Use _result here\n};\n```"},{"user":"Demellion","date":"2017-11-01T18:35:00Z","text":"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."}],"categories_extra":["Introduced with Take On Helicopters version 1.00","Take On Helicopters: Functions","Take On Helicopters: New Functions"]}