# sm.game.getDifficulty

Return the index of the current difficulty setting.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
sm.game.getDifficulty(  )
```

[Open the full Game reference](../Game-Script-Environment/Static-Functions/sm.game.md#getdifficulty)

**Returns:**

| Name | Type | Description |
| --- | --- | --- |
| `index` | integer | The difficulty index. |
