> For the complete documentation index, see [llms.txt](https://docs.sannybuilder.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sannybuilder.com/troubleshooting/errors/0101.md).

# 0101: Variable is not a class instance

Compiler found a possible class method used with a variable, but the [variable type](/language/data-types/variables.md#declaring-a-variable-type) is unknown:

```pascal
if
  $player.isPlaying
then
...
end
```

In order to correctly identify the command used here, the compiler should know what class the `$player` variable represents.

**Possible solutions:**

* Define the type of the variable explicitly using a [`var`](/language/data-types/variables.md#declaring-a-variable-type) keyword:

```pascal
var $player: Player
if
  $player.isPlaying // compiles as 0256: is_player_playing $player
then
...
end
```

* Define the type of the variable explicitly using the `Player` class name:

```pascal
Player $player
if
  $player.isPlaying // compiles as 0256: is_player_playing $player
then
...
end
```

* Use a combination of the class name and class method:

```pascal
if
  Player.IsPlaying($player) // compiles as 0256: is_player_playing $player
then
...
end
```
