profileNamespace: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " *\|= * " to " ")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| TKOH |Game name=
| TKOH


|1.00|Game version=
|1.00


|gr1= Variables |GROUP1=
|gr1= Variables


| Returns the global namespace attached to the active user profile. Use [[setVariable]] and [[getVariable]] to save and load data to and from this [[Namespace]]. A variable can be deleted by setting its value to [[nil]]. By default the variables set in this namespace will exist while the game is running. In order to make variables save permanently, use [[saveProfileNamespace]] before the game is over.
| Returns the global namespace attached to the active user profile. Use [[setVariable]] and [[getVariable]] to save and load data to and from this [[Namespace]]. A variable can be deleted by setting its value to [[nil]]. By default the variables set in this namespace will exist while the game is running. In order to make variables save permanently, use [[saveProfileNamespace]] before the game is over.
The variables are stored next to the user profile in a file named ''myUsername.vars.GAMENAME'' (e.g. in the ''My Documents\Take On Helicopters'' folder). |DESCRIPTION=
The variables are stored next to the user profile in a file named ''myUsername.vars.GAMENAME'' (e.g. in the ''My Documents\Take On Helicopters'' folder).


| '''profileNamespace'''|SYNTAX=
| '''profileNamespace'''


| [[Namespace]] |RETURNVALUE=
| [[Namespace]]


|x1= <code>_namespace = '''profileNamespace''';</code> |Example1=
|x1= <code>_namespace = '''profileNamespace''';</code>
|x2= <code>'''profileNamespace''' [[setVariable]] ["var_kills",10000];
|x2= <code>'''profileNamespace''' [[setVariable]] ["var_kills",10000];
_playerKills = '''profileNamespace''' [[getVariable]] "var_kills";</code>
_playerKills = '''profileNamespace''' [[getVariable]] "var_kills";</code>


| [[saveProfileNamespace]], [[missionNamespace]], [[uiNamespace]], [[parsingNamespace]], [[currentNamespace]], [[localNamespace]], [[allVariables]], [[with]], [[ArmA:_Editing#Forward_Compatibility|Forward Compatibility]] |SEEALSO=
| [[saveProfileNamespace]], [[missionNamespace]], [[uiNamespace]], [[parsingNamespace]], [[currentNamespace]], [[localNamespace]], [[allVariables]], [[with]], [[ArmA:_Editing#Forward_Compatibility|Forward Compatibility]]


}}
}}

Revision as of 02:24, 18 January 2021

Hover & click on the images for description

Description

Description:
Returns the global namespace attached to the active user profile. Use setVariable and getVariable to save and load data to and from this Namespace. A variable can be deleted by setting its value to nil. By default the variables set in this namespace will exist while the game is running. In order to make variables save permanently, use saveProfileNamespace before the game is over. The variables are stored next to the user profile in a file named myUsername.vars.GAMENAME (e.g. in the My Documents\Take On Helicopters folder).
Groups:
Variables

Syntax

Syntax:
profileNamespace
Return Value:
Namespace

Examples

Example 1:
_namespace = profileNamespace;
Example 2:
profileNamespace setVariable ["var_kills",10000]; _playerKills = profileNamespace getVariable "var_kills";

Additional Information

See also:
saveProfileNamespacemissionNamespaceuiNamespaceparsingNamespacecurrentNamespacelocalNamespaceallVariableswithForward Compatibility

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

Notes

Unknown
The variables are loaded when the user profile is loaded or changed.

Bottom Section