# 0109: Expected variables to store function result

Compiler expected a certain number of [variables](/language/data-types/variables.md) to store the result of the [function](/language/functions.md) but got different number.

If a function returns one value, the following code will be invalid:

```pascal
function returnOne: int
  return 1
end

int x,y


returnOne() // error, expected 1 variable, got 0
x,y = returnOne() // error, expected 1 variable, got 2
```

#### Possible solutions:

* on the left-hand side of the expression, provide variables to store each value returned from the function, if there are any

```pascal
function returnNone
end

function returnOne: int
  return 1
end

function returnTwo: int, int
  return 1 2
end

int x, y

returnNone()
x = returnOne()
x, y = returnTwo()
```


---

# 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/0109.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.
