---
name: "BIS_fnc_recompile"
type: function
status: ok
groups: ["Diagnostic"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_recompile
revid: 327400
updated: 2022-07-12T22:11:58Z
---

# BIS_fnc_recompile

*Function · Diagnostic · Arma 3 v0.50 · introduced in Arma 2 v1.00*

## Description

Can be used to recompile functions.

> [!NOTE]
> As a security measure, functions are by default protected against rewriting during the mission. This restriction does **not** apply to:
> - missions previewed from the editor
> - missions with the following attribute in [Description.ext](../topics/Description.ext.md): 
>
> ```cpp
> allowFunctionsRecompile = 1;
> ```

## Syntax

```sqf
[mode] call BIS_fnc_recompile
```

**Parameters:**

- `mode (Optional, default 0)`:
  - [String](../topics/String.md) - name of the function to be recompiled
  - [Number](../topics/Number.md) - can be:
    - 0 - Autodetect what compile type should be used
    - 1 - Forced recompile of all the things
    - 2 - Create only uiNamespace variables (used in UI)
    - 3 - Create missionNamespace variables and initialize mission
    - 4 - Create only missionNamespace variables
    - 5 - Recompile all functions, and initialize mission (used for editor preview with function recompile)

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

## Examples

### Example 1

```sqf
[] call BIS_fnc_recompile;
```

### Example 2

```sqf
[3] call BIS_fnc_recompile;
```

### Example 3

```sqf
["BIS_fnc_spawnVehicle"] call BIS_fnc_recompile;
```

## See also

[compile](../commands/compile.md) · [compileFinal](../commands/compileFinal.md)

<sub>Source: [BI Community Wiki — BIS fnc recompile](https://community.bistudio.com/wiki/BIS_fnc_recompile) (revision 327400).</sub>
