Syntax
messagebox(text: string, caption: string, flags: number): integerArguments
| Name | Type | Description |
|---|---|---|
text | string | Message text. |
caption | string | Window caption. |
flags | number | Numeric message box flags. |
Returns
| Name | Type | Description |
|---|---|---|
result | integer | Integer result code returned by the message box. |
Description
Shows a Windows message box with text, caption, and numeric flags, then returns the integer result code.
Call it with 3 parameter(s): text, caption, flags. The argument table explains which values are required and which ones only refine the behavior.
It returns result (integer). Use the returns table to separate successful values from nil results and recoverable errors.
Example
Show a Windows message box and read the integer result code returned by the dialog.
local result = messagebox("Real is ready.", "Real", 0)
print(result)