Namespace – Talk
Jump to navigation
Jump to search
HeliJunkie (talk | contribs) No edit summary |
Lou Montana (talk | contribs) m (Text replacement - "<code>" to "<code style="display: block">") |
||
Line 7: | Line 7: | ||
You can save values in this diffrent Namespaces without overwriting the variables with the same name. | You can save values in this diffrent Namespaces without overwriting the variables with the same name. | ||
<code>missionnamespace setvariable ["testValue","someValue"]; | <code style="display: block">missionnamespace setvariable ["testValue","someValue"]; | ||
hint format["Mission: %1\nParsing:%2", missionnamespace getVariable "testValue", parsingNamespace getVariable "testValue"]; | hint format["Mission: %1\nParsing:%2", missionnamespace getVariable "testValue", parsingNamespace getVariable "testValue"]; | ||
</code> | </code> | ||
Output: | Output: | ||
<code>Mission: someValue | <code style="display: block">Mission: someValue | ||
Parsing: <null> | Parsing: <null> | ||
</code> | </code> | ||
--[[User:HeliJunkie|HeliJunkie]] 19:04, 6 June 2009 (CEST) | --[[User:HeliJunkie|HeliJunkie]] 19:04, 6 June 2009 (CEST) |
Latest revision as of 11:52, 11 January 2023
I found 3 statements that return the "Namespace" type:
- parsingNamespace
- Return the global namespace attached to config Parser
- missionNamespace
- Return the global namespace attached to the mission
- uiNamespace
- Return the global namespace attached to the user interface
You can save values in this diffrent Namespaces without overwriting the variables with the same name.
missionnamespace setvariable ["testValue","someValue"];
hint format["Mission: %1\nParsing:%2", missionnamespace getVariable "testValue", parsingNamespace getVariable "testValue"];
Output:
Mission: someValue
Parsing: <null>
--HeliJunkie 19:04, 6 June 2009 (CEST)