# 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
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sannybuilder.com/troubleshooting/errors/0101.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
