{"name":"profileNamespace","operator":null,"title":"profileNamespace","type":"command","url":"https://community.bistudio.com/wiki/profileNamespace","revid":369330,"updated":"2024-09-03T18:43:00Z","groups":["Namespaces","Variables"],"status":"ok","replaced_by":[],"games":[{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.62"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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.\n\nThe variables are stored next to the user profile in a file named `myUsername.vars.GAMENAME`.","syntaxes":[{"syntax":"profileNamespace","since":null,"effect":null,"exec":null,"params":[],"returns":{"type":"Namespace","types":["Namespace"],"description":null,"text":"Namespace"},"form":"nullary","operator":null,"left":null,"right":null}],"examples":[{"text":"```sqf\nprofileNamespace setVariable [\"TAG_kills\", 10000];\n// somewhere else in the code\n_kills = profileNamespace getVariable [\"TAG_kills\", 0];\n```","code":["profileNamespace setVariable [\"TAG_kills\", 10000];\n// somewhere else in the code\n_kills = profileNamespace getVariable [\"TAG_kills\", 0];"]}],"multiplayer":null,"problems":null,"aliases":[],"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."}],"categories":["Arma 2: Operation Arrowhead: Scripting Commands","Arma 3: Scripting Commands","Command Group: Namespaces","Command Group: Variables","Introduced with Take On Helicopters version 1.00","Scripting Commands","Take On Helicopters: New Scripting Commands","Take On Helicopters: Scripting Commands"]}