# getConvarInt (Shared)

> Reads a convar as an integer.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Shared
- **Category**: Convars
- **URL**: https://wiki.mymp.gg/en/getConvarInt

## Syntax

```lua
int getConvarInt(string name [, int default = 0])
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `name` | `string` | The convar's name. |
| `default` | `int` | What to return when the convar does not exist or is not an integer. *(default: `0`)* |

## Returns

The convar's value. If it does not exist or is not an integer, `default`.

## Example

```lua
local queueSize = getConvarInt("queue_size", 500)
```

## See also

- [getConvar (Shared)](https://wiki.mymp.gg/en/getConvar.md): Reads a convar as text. On a client, a convar the server syncs comes before the client's own.
