> 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/0109.md).

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