---
name: "saveProfileNamespace"
type: command
status: ok
groups: ["Namespaces", "Variables"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/saveProfileNamespace
revid: 369335
updated: 2024-09-03T18:43:00Z
---

# saveProfileNamespace

*Command · Namespaces, Variables · Arma 3 v0.50 · introduced in Take On Helicopters v1.00*

## Description

Saves all variables stored in [profileNamespace](../commands/profileNamespace.md) to the active Profile.

> [!NOTE]
> This command should be used when it is likely that the game will not be closed the usual way (e.g. via <kbd>Alt</kbd>+<kbd>F4</kbd>) or when the data is important and must not be lost due to a game crash.

> [!WARNING]
> - This command triggers a file operation. As file operations are slow (even on SSDs), it is not recommended to use this command too frequently (i.e. several times per second).
> - Do not save large amounts of data to the profile; the larger the profile file gets, the slower it loads!
> - The [profileNamespace](../commands/profileNamespace.md) is saved automatically when the game is closed.

> [!NOTE]
> **Take On Helicopters:** Heliport status, used in the Career mode for example, is stored in the file that is modified by this command, so be mindful of this to avoid losing data and progress.

## Syntax

```sqf
saveProfileNamespace
```

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

## Examples

### Example 1

```sqf
profileNamespace setVariable ["TAG_lastPlayerLocation", getPosASL player];
saveProfileNamespace; // Optional since namespace is saved when game is closed
```

## See also

[saveMissionProfileNamespace](../commands/saveMissionProfileNamespace.md) · [save3DENPreferences](../commands/save3DENPreferences.md) · [profileNamespace](../commands/profileNamespace.md) · Profile

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