saveProfileNamespace: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "Category:Arma 2: Operation Arrowhead: New Scripting Commands List" to "Category:Arma 2: Operation Arrowhead: New Scripting Commands")
m (formatting)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| TKOH
|game1= tkoh


|1.00
|version1= 1.00
 
|game2= arma3
 
|version2= 0.50


|gr1= System
|gr1= System


| Saves all variables stored in [[profileNamespace]] to the (persistently stored) active [[Profile]].
|descr= Saves all variables stored in [[profileNamespace]] to the active [[Profile]].


{{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).}}
{{Feature|Warning|
{{Feature|important|Do not save large amounts of data to the profile; the larger the profile file gets, the slower it loads!}}
* 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).
{{Feature|tkoh|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.}}
* 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.
}}
{{Feature|tkoh|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.}}


| '''saveProfileNamespace'''
|s1= '''saveProfileNamespace'''


| [[Nothing]]
|r1= [[Nothing]]


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


|seealso= [[profileNamespace]], [[Profile]]
|seealso= [[profileNamespace]], [[Profile]]
}}
}}
<dl class="command_description">
<!-- Note Section BEGIN -->
<dd class="notedate">17:34, 25 November 2011‎</dd>
<dt class="note">{{User|Joris}}</dt>
<dd class="note">Variables are also saved when the game is quit.
<!-- Note Section END -->
</dl>
[[Category:Arma 2: Operation Arrowhead: New Scripting Commands|{{uc:{{PAGENAME}}}}]]
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}

Revision as of 12:15, 30 March 2021

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:
System

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:
profileNamespaceProfile

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