{"name":"profileNamespace","title":"profileNamespace","type":"command","url":"https://community.bistudio.com/wiki/profileNamespace","revid":369330,"updated":"2024-09-03T18:43:00Z","groups":["Namespaces","Variables"],"status":"ok","games":{"tkoh":"1.00","arma2oa":"1.62","arma3":"0.50"},"since":"tkoh 1.00","arma3_since":"0.50","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.\nThe variables are stored next to the user profile in a file named `myUsername.vars.GAMENAME`.","syntaxes":[{"syntax":"profileNamespace","params":[],"returns":{"type":"Namespace","type_expr":"Namespace"},"form":"nullary"}],"examples":[{"code":["profileNamespace setVariable [\"TAG_kills\", 10000];\n// somewhere else in the code\n_kills = profileNamespace getVariable [\"TAG_kills\", 0];"]}],"see_also":["saveProfileNamespace","missionNamespace","uiNamespace","parsingNamespace","currentNamespace","localNamespace","allVariables","with","ArmA: Editing"],"notes":[{"user":"Joris","date":"2011-11-25T17:33:00Z","text":"The variables are loaded when the user profile is loaded or changed."}]}