{"name":"saveProfileNamespace","title":"saveProfileNamespace","type":"command","url":"https://community.bistudio.com/wiki/saveProfileNamespace","revid":369335,"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":"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","params":[],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"nullary"}],"examples":[{"code":["profileNamespace setVariable [\"TAG_lastPlayerLocation\", getPosASL player];\nsaveProfileNamespace; // Optional since namespace is saved when game is closed"]}],"see_also":["saveMissionProfileNamespace","save3DENPreferences","profileNamespace","Profile"]}