---
name: "text"
type: command
status: ok
groups: ["Locations", "Strings", "Structured Text"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/text
revid: 320624
updated: 2022-05-13T09:38:21Z
---

# text

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

## Description

Creates a structured text containing the given plain text if argument is [String](../topics/String.md). Use [setAttributes](../commands/setAttributes.md) to set additional [attributes](../topics/Structured_Text.md#attributes) on the text. If the argument is [location](../topics/Location.md), returns location's text value (see Alt Syntax).

## Syntax

### Syntax 1

```sqf
text string
```

**Parameters:**

- `string`: [String](../topics/String.md)

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

### Syntax 2

```sqf
text location
```

**Parameters:**

- `location`: [Location](../topics/Location.md)

**Returns:** [String](../topics/String.md)

## Examples

### Example 1

```sqf
_stxt2 = text "Hello world.";
```

### Example 2

```sqf
_townName = text myTownLocation;
```

### Example 3

```sqf
_loc = text nearestLocation [position player, "NameMarine"]; //"Marina Bay"
```

## See also

[parseText](../commands/parseText.md) · [composeText](../commands/composeText.md) · [image](../commands/image.md) · [lineBreak](../commands/lineBreak.md) · [setText](../commands/setText.md) · [createLocation](../commands/createLocation.md) · [deleteLocation](../commands/deleteLocation.md) · [drawLocation](../commands/drawLocation.md) · [locationPosition](../commands/locationPosition.md) · [locationNull](../commands/locationNull.md) · [nearestLocation](../commands/nearestLocation.md) · [nearestLocations](../commands/nearestLocations.md) · [nearestLocationWithDubbing](../commands/nearestLocationWithDubbing.md) · [name](../commands/name.md)

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