saveProfileNamespace: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*) ([^ ]*)<\/code>" to "<code>$1$2$3 $4</code>")
m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
Line 26: Line 26:
|r1= [[Nothing]]
|r1= [[Nothing]]


|x1= <code>profileNamespace setVariable ["TAG_lastPlayerLocation", getPosASL player];
|x1= <sqf>profileNamespace setVariable ["TAG_lastPlayerLocation", getPosASL player];
saveProfileNamespace;// Optional since namespace is saved when game is closed</code>
saveProfileNamespace;// Optional since namespace is saved when game is closed</sqf>


|seealso= [[profileNamespace]] [[Profile]]
|seealso= [[profileNamespace]] [[Profile]]
}}
}}

Revision as of 10:24, 13 May 2022

Hover & click on the images for description

Description

Description:
Saves all variables stored in profileNamespace to the active Profile.
  • 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!
  • The profileNamespace is also saved when the game is closed.
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.
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

See also:
profileNamespace Profile

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