> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# messagebox

> Shows a Windows message box with text, caption, and numeric flags, then returns the integer result code.

Shows a Windows message box with text, caption, and numeric flags, then returns the integer result code.

## Syntax

```lua theme={null}
messagebox(text: string, caption: string, flags: number): integer
```

## Arguments

| Name      | Type     | Required | Description                |
| --------- | -------- | -------- | -------------------------- |
| `text`    | `string` | Yes      | Message text.              |
| `caption` | `string` | Yes      | Window caption.            |
| `flags`   | `number` | Yes      | Numeric message box flags. |

## Returns

| Name     | Type      | Description                                      |
| -------- | --------- | ------------------------------------------------ |
| `result` | `integer` | Integer result code returned by the message box. |

## Example

Show a Windows message box and read the integer result code returned by the dialog.

```lua theme={null}
local result = messagebox("Real is ready.", "Real", 0)
print(result)
```
