profileNamespace: Difference between revisions
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= arma2oa | |||
|version2= ? | |||
|game3= arma3 | |||
|version3= 0.50 | |||
|gr1= Variables | |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. | |descr= 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 and variables are saved persistently when the game is closed. Saving can also be forced by using [[saveProfileNamespace]]. | ||
The variables are stored next to the user profile in a file named | The variables are stored next to the user profile in a file named <tt>myUsername.vars.GAMENAME</tt>. | ||
| '''profileNamespace''' | |s1= '''profileNamespace''' | ||
| [[Namespace]] | |r1= [[Namespace]] | ||
|x1= <code>_namespace = '''profileNamespace''';</code> | |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]] | ||
}} | }} | ||
<dl class="command_description"> | <dl class="command_description"> | ||
<dt class="note">Unknown</dt> | <dt class="note">Unknown</dt> | ||
<dd class="note">The variables are loaded when the user profile is loaded or changed. | <dd class="note">The variables are loaded when the user profile is loaded or changed. | ||
</dl> | </dl> | ||
Revision as of 12:19, 30 March 2021
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 and variables are saved persistently when the game is closed. Saving can also be forced by using saveProfileNamespace. The variables are stored next to the user profile in a file named myUsername.vars.GAMENAME.
- 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
- Unknown
- The variables are loaded when the user profile is loaded or changed.
Categories:
- Scripting Commands
- Introduced with Take On Helicopters version 1.00
- Take On Helicopters: New Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Variables
- Arma 2: Operation Arrowhead: New Scripting Commands
- Arma 2: Scripting Commands