From Bohemia Interactive Community
Hover & click on the images for description
Description
- Description:
- Creates a With Type that is used inside a do construct in order to execute code inside a given namespace.
- Problems:
- When used in a do-construct in scripts with allowed suspension, a namespace switching might unexpectedly occur inside some scopes (for, if, try, call) started in a scheduled environment after small suspension if with was not the main scope; however, the issue does not arise if with is used in the parent scope:
| namespace switch risk
|
namespace switch safe
|
|
|
|
- Groups:
- Program FlowNamespaces
Syntax
- Syntax:
- with namespace
- Parameters:
- namespace: Namespace
- Return Value:
- With Type
Examples
- Example 1:
- Example 2:
Additional Information
- See also:
- missionNamespace uiNamespace parsingNamespace currentNamespace
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here!
Add Note
- Hypoxic125 - c
- Posted on Feb 23, 2023 - 07:05 (UTC)
-
Using with:
is the same as:
This allows you to quickly modify variables within a namespace without using get/setvariable every time.