---
name: "formatText"
type: command
status: ok
groups: ["Strings", "Structured Text"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/formatText
revid: 351276
updated: 2023-11-27T02:21:39Z
---

# formatText

*Command · Strings, Structured Text · Arma 3 v0.50 · introduced in Armed Assault v1.00*

## Description

Creates a [Structured Text](../topics/Structured_Text.md) similar to [format](../commands/format.md) command.

## Syntax

```sqf
formatText [format, argument1, argument2, ...]
```

**Parameters:**

- `format`: [String](../topics/String.md) - a string containing text and/or references to the variables listed below in the array. The references appear in the form of %1, %2 etc.
- `argumentN`: [Anything](../topics/Anything.md) - use [Structured Text](../topics/Structured_Text.md) where necessary (see [Example 2](../commands/formatText.md#example))

**Returns:** [Structured Text](../topics/Structured_Text.md)

## Examples

### Example 1

```sqf
hint formatText ["Image: %1", image "\a3\Data_f\Flags\flag_Altis_co.paa"];
```

### Example 2

```sqf
hint formatText ["%1%2%3", "line1", "<br/>", "line2"];        // result displayed in one line
hint formatText ["%1%2%3", "line1", lineBreak, "line2"];    // result displayed in two lines
```

## See also

[Structured Text](../topics/Structured_Text.md) · [format](../commands/format.md) · [composeText](../commands/composeText.md) · [text](../commands/text.md) · [parseText](../commands/parseText.md)

<sub>Source: [BI Community Wiki — formatText](https://community.bistudio.com/wiki/formatText) (revision 351276).</sub>
