---
name: "profileNamespace"
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/profileNamespace
revid: 369330
updated: 2024-09-03T18:43:00Z
---

# profileNamespace

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

## Description

Returns the global namespace attached to the active user profile. Use [setVariable](../commands/setVariable.md) and [getVariable](../commands/getVariable.md) to save and load data to and from this [Namespace](../topics/Namespace.md). A variable can be deleted by setting its value to [nil](../commands/nil.md). By default the variables set in this namespace will exist while the game is running, and variables are saved persistently when the game is closed. Saving can also be forced by using [saveProfileNamespace](../commands/saveProfileNamespace.md) to prevent data loss on e.g game crash.

The variables are stored next to the user profile in a file named `myUsername.vars.GAMENAME`.

## Syntax

```sqf
profileNamespace
```

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

## Examples

### Example 1

```sqf
profileNamespace setVariable ["TAG_kills", 10000];
// somewhere else in the code
_kills = profileNamespace getVariable ["TAG_kills", 0];
```

## See also

[saveProfileNamespace](../commands/saveProfileNamespace.md) · [missionNamespace](../commands/missionNamespace.md) · [uiNamespace](../commands/uiNamespace.md) · [parsingNamespace](../commands/parsingNamespace.md) · [currentNamespace](../commands/currentNamespace.md) · [localNamespace](../commands/localNamespace.md) · [allVariables](../commands/allVariables.md) · [with](../commands/with.md) · ArmA: Editing

## Community notes

**Joris** — 2011-11-25

The variables are loaded when the user profile is loaded or changed.

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