saveProfileNamespace: Difference between revisions
Jump to navigation
Jump to search
m (Small adjustments) |
Lou Montana (talk | contribs) m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>") |
||
(One intermediate revision by the same user not shown) | |||
Line 15: | Line 15: | ||
|descr= Saves all variables stored in [[profileNamespace]] to the active [[Profile]]. | |descr= Saves all variables stored in [[profileNamespace]] to the active [[Profile]]. | ||
{{Feature|informative|This command should be used when it is likely that the game will not be closed the usual way (e.g. via {{Controls|Alt|F4}}) or when the data is important and must not be lost due to a game crash.}} | {{Feature|informative|This command should be used when it is likely that the game will not be closed the usual way (e.g. via {{Controls|Alt|F4}}) or when the data is important and must not be lost due to a game crash.}} | ||
{{Feature| | {{Feature|warning| | ||
* 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). | * 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). | ||
* Do not save large amounts of data to the profile; the larger the profile file gets, the slower it loads! | * Do not save large amounts of data to the profile; the larger the profile file gets, the slower it loads! | ||
Line 26: | Line 26: | ||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
|x1= <sqf>profileNamespace setVariable ["TAG_lastPlayerLocation", getPosASL player]; | |x1= <sqf> | ||
saveProfileNamespace; // Optional since namespace is saved when game is closed</sqf> | profileNamespace setVariable ["TAG_lastPlayerLocation", getPosASL player]; | ||
saveProfileNamespace; // Optional since namespace is saved when game is closed | |||
</sqf> | |||
|seealso= [[saveMissionProfileNamespace]] [[save3DENPreferences]] [[profileNamespace]] [[Profile]] | |seealso= [[saveMissionProfileNamespace]] [[save3DENPreferences]] [[profileNamespace]] [[Profile]] | ||
}} | }} |
Latest revision as of 19:43, 3 September 2024
Description
- Description:
- Saves all variables stored in profileNamespace to the active Profile.
- Groups:
- NamespacesVariables
Syntax
- Syntax:
- saveProfileNamespace
- Return Value:
- Nothing
Examples
- Example 1:
- profileNamespace setVariable ["TAG_lastPlayerLocation", getPosASL player]; saveProfileNamespace; // Optional since namespace is saved when game is closed
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note