# 0127: Unexpected mission label in function

Compiler found a mission start [label](/language/control-flow/labels.md) inside a [function body](/language/functions.md#function-body):

```pascal
DEFINE MISSION 1 AT @mission1

function foo
:mission1 // Unexpected mission label mission1 in function foo
end
```

#### Possible solutions:

* give the label a unique name:

```pascal
DEFINE MISSION 1 AT @mission1

function foo
:label
end
```

* check that the function body ends before the mission label:

```pascal
DEFINE MISSION 1 AT @mission1

function foo
end

:mission1
```


---

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