# 0022: Loop counter is not a variable

The compiler finds that a `FOR` [loop](https://docs.sannybuilder.com/language/control-flow/loops#for-end)'s counter is not a [variable](https://docs.sannybuilder.com/language/data-types/variables).

**Possible solutions:** use a variable as the counter of the loop iterations:

```
FOR $MyCounter = 1 to 10

END
```
