Arma 3 Scripting

profileNamespace

  • Arma 3 v0.50
  • First in Take On Helicopters v1.00

Command · also in Variables · Markdown · JSON · original wiki page

Description

Returns the global namespace attached to the active user profile. Use setVariable and getVariable to save and load data to and from this Namespace. A variable can be deleted by setting its value to nil. 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 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

profileNamespace

Returns: Namespace

Examples

Example 1

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

See also

saveProfileNamespace · missionNamespace · uiNamespace · parsingNamespace · currentNamespace · localNamespace · allVariables · with · ArmA: Editing

Community notes

Joris

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