# Editor.ConsoleSystem.GetValueInt

```csharp
static int GetValueInt(string name, int defaultValue = 0)
```

Get a convar value as an integer if possible.

### Parameters

- `name` (`string`)
- `defaultValue` (`int`), default `0`

### Returns

`int`

Declared in [Editor.ConsoleSystem](/api/Editor.ConsoleSystem).
Assembly: `Sandbox.Tools`.
