---
name: "scopeName"
type: command
status: ok
groups: ["Program Flow"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/scopeName
revid: 363355
updated: 2024-03-27T12:05:28Z
---

# scopeName

*Command · Program Flow · Arma 3 v0.50 · introduced in Armed Assault v1.00*

## Description

Defines name of current scope. Name is visible in debugger, and name is also used as reference in some commands like [breakOut](../commands/breakOut.md) and [breakTo](../commands/breakTo.md).
Scope name should be defined only once per scope. Trying to set a different name on the scope that has already defined scope name will result in error.

## Syntax

```sqf
scopeName name
```

**Parameters:**

- `name`: [String](../topics/String.md)

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
scopeName "main";
while { sleep 0.1; true } do
{
    scopeName "loop1";

    while { sleep 0.1; true } do
    {
        scopeName "loop2";

        // ...
    };
};
```

### Example 2

```sqf
if (true) then
{
    scopeName "mainScope";
    scopeName "main_scope"; // error
};
```

## See also

[breakOut](../commands/breakOut.md) · [breakTo](../commands/breakTo.md)

<sub>Source: [BI Community Wiki — scopeName](https://community.bistudio.com/wiki/scopeName) (revision 363355).</sub>
