{"name":"saveProfileNamespace","operator":null,"title":"saveProfileNamespace","type":"command","url":"https://community.bistudio.com/wiki/saveProfileNamespace","revid":369335,"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":"Saves all variables stored in profileNamespace to the active Profile.\n\n> [!NOTE]\n> 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.\n\n> [!WARNING]\n> - 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).\n> - Do not save large amounts of data to the profile; the larger the profile file gets, the slower it loads!\n> - The profileNamespace is saved automatically when the game is closed.\n\n> [!NOTE]\n> **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.","syntaxes":[{"syntax":"saveProfileNamespace","since":null,"effect":null,"exec":null,"params":[],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"nullary","operator":null,"left":null,"right":null}],"examples":[{"text":"```sqf\nprofileNamespace setVariable [\"TAG_lastPlayerLocation\", getPosASL player];\nsaveProfileNamespace; // Optional since namespace is saved when game is closed\n```","code":["profileNamespace setVariable [\"TAG_lastPlayerLocation\", getPosASL player];\nsaveProfileNamespace; // Optional since namespace is saved when game is closed"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["saveMissionProfileNamespace","save3DENPreferences","profileNamespace","Profile"],"notes":[],"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"]}