---
name: "BIS_fnc_onLoad"
type: function
status: ok
groups: ["Event Handlers"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_onLoad
revid: 328472
updated: 2022-07-13T16:11:09Z
---

# BIS_fnc_onLoad

*Function · Event Handlers · Arma 3 v0.50 · introduced in Take On Helicopters v1.00*

## Description

Register code to be executed after a mission load (from a save, for example).

> [!IMPORTANT]
> Replaced by ["loaded" mission event handler](../topics/Mission_Event_Handlers.md#loaded).
>
> This function now exists only because of backward compatibility

## Syntax

```sqf
parameter call BIS_fnc_onLoad
```

**Parameters:**

- `parameter`: [Code](../topics/Code.md) or [Number](../topics/Number.md):
  - [Code](../topics/Code.md) - code to be executed on mission load
  - [Number](../topics/Number.md) - index of code to remove

**Returns:** [Number](../topics/Number.md) - index of onLoad code

## Examples

### Example 1

```sqf
private _codeIndex = { hint "Welcome back!"; } call BIS_fnc_onLoad;
```

### Example 2

```sqf
0 call BIS_fnc_onLoad; // removes code with index 0
```

## See also

[Arma 3: Mission Event Handlers](../topics/Mission_Event_Handlers.md) · [addMissionEventHandler](../commands/addMissionEventHandler.md)

<sub>Source: [BI Community Wiki — BIS fnc onLoad](https://community.bistudio.com/wiki/BIS_fnc_onLoad) (revision 328472).</sub>
