---
name: "continueWith"
type: command
status: ok
groups: ["Program Flow"]
arma3_since: "2.02"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/continueWith
revid: 378202
updated: 2026-03-12T15:42:26Z
---

# continueWith

*Command · Program Flow · Arma 3 v2.02*

## Description

Skips the current loop iteration, continues with the next one and returns the given value.

## Syntax

### Syntax 1

```sqf
continueWith return
```

**Parameters:**

- `return`: [Anything](../topics/Anything.md) - value to be returned when iteration is skipped

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

### Syntax 2

*since arma3 2.22*

```sqf
scriptHandle continueWith code
```

**Parameters:**

- `scriptHandle`: [Script Handle](../topics/Script_Handle.md)
- `code`: [Code](../topics/Code.md) - Code to execute once the [Promise](../topics/Script_Handle.md#promise_handles) has completed. The code will be executed in [Unscheduled Environment](../topics/Scheduler.md#unscheduled_environment).

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

### Syntax 3

*since arma3 2.22*

```sqf
scriptHandle continueWith [code, args]
```

**Parameters:**

- `scriptHandle`: [Script Handle](../topics/Script_Handle.md)
- `code`: [Code](../topics/Code.md) - Code to execute once the [Promise](../topics/Script_Handle.md#promise_handles) has completed. The code will be executed in [Unscheduled Environment](../topics/Scheduler.md#unscheduled_environment).
- `args`: [Anything](../topics/Anything.md) - Arguments passed into code in _thisArgs variable

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

## Examples

### Example 1

```sqf
// results in [2, "TEST", 4]
private _result = [1, 2, 3] apply {
    if (_x == 2) then {
        continueWith "TEST";
    } else {
        _x + 1;
    };
};
```

## See also

[continue](../commands/continue.md) · [break](../commands/break.md) · [breakWith](../commands/breakWith.md)

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