> For the complete documentation index, see [llms.txt](https://xtask.rlib.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xtask.rlib.io/configuration/achievements/xtask.desc.md).

# XTASK.desc

Specifies the description that will appear below the title of an achievement.

## <mark style="color:red;">▸ Data Type</mark>

&#x20;      <mark style="color:yellow;">**string**</mark>

## <mark style="color:red;">▸ Description</mark>

This value will show a description below the title of each achievement. It would be a brief summary of what the player must do in order to complete the achievement.

## <mark style="color:red;">▸ Example</mark>

```lua
XTASK.desc = sf( 'Play on the server when there\'s %s or more people. (Bots don\'t count)', tostring( XTASK.param_extra ) )
```

### <mark style="color:purple;">▸ Structuring String</mark>

A string is text that is surrounded by quotation marks.&#x20;

The description above tells the player they must play on the server with <mark style="color:yellow;">**%s**</mark> players or more.

In-game, the <mark style="color:yellow;">**%s**</mark> will be replaced with the actual number of players required to complete the achievement.

If we break the code apart; it means:

<mark style="color:red;">**sf**</mark> is a shortcut for [**`string.format`**](https://wiki.facepunch.com/gmod/string.format)`--` [you can **click here** to read about this function on the official Garry's Mod Wiki](https://wiki.facepunch.com/gmod/string.format).

At the end of our `string.format`; we have placed <mark style="color:yellow;">**`tostring( XTASK.param_extra )`**</mark>

When the code is ran in-game, %s will be replaced with the value specified for <mark style="color:yellow;">**XTASK.params\_extra**</mark>:

```lua
XTASK.maxreq        = 1
XTASK.param_extra   = 60
XTASK.desc          = sf( 'Play on the server when there\'s %s or more people. (Bots don\'t count)', tostring( XTASK.param_extra ) )
```

<mark style="color:red;">**%s**</mark> is replaced with <mark style="color:yellow;">**60**</mark>

&#x20;`string.format` example:

```lua
sf( 'I like to eat %s and %s.', 'apples', 'bananas' )
```

The first **%s** will be replaced with **apples**; the second **%s** will be replaced with **bananas**.

In-game; you see the following:

```
I like to eat apples and bananas.
```

### <mark style="color:purple;">▸ Escaping Characters</mark>

Finally, backslashes were inserted in the description:

```lua
'(Bots don\'t count)'
```

&#x20;<mark style="color:yellow;">**\\**</mark> character should be placed **before** an **apostrophe** to *escape* the character or you will receive errors. This can be avoided if you write the string using **double quotation marks**. Since the beginning of the string starts with <mark style="color:yellow;">**'**</mark>**&#x20;--** it will see <mark style="color:yellow;">**don'**</mark> as the end of the string.

Both of the following examples are a proper way to write a string for your description:

```lua
"(Bots don't count)"
```

***OR***

```lua
'(Bots don\'t count)'
```
