# 0102: Switch statement needs a variable

Compiler expected a [variable](https://docs.sannybuilder.com/language/data-types/variables) to follow the [`switch`](https://docs.sannybuilder.com/language/control-flow/switch#syntax) keyword but found something else.

This error may occur if you use a number or string literal after `switch`.

**Possible solutions:**

* check your code and make sure you use a variable in the switch statement:

```
switch <var>
...
end
```

`<var>` can be an integer, float, string variable and also [ADMA](https://docs.sannybuilder.com/language/data-types/variables#dma-variables)-variable starting with `&`. See the documentation on [switch](https://docs.sannybuilder.com/language/control-flow/switch) for more information.
