scopeName: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>")
m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
Line 26: Line 26:
|r1= [[Nothing]]
|r1= [[Nothing]]


|x1= <code>scopeName "main";
|x1= <sqf>scopeName "main";
while {true} do {
while {true} do {
scopeName "loop1";
scopeName "loop1";
Line 33: Line 33:
...
...
};
};
};</code>
};</sqf>


|seealso= [[breakOut]] [[breakTo]]
|seealso= [[breakOut]] [[breakTo]]
}}
}}

Revision as of 10:24, 13 May 2022

Hover & click on the images for description

Description

Description:
Defines name of current scope. Name is visible in debugger, and name is also used as reference in some commands like breakOut and breakTo. Scope name should be defined only once per scope. Trying to set a different name on the scope that has already defined scope name will result in error.
Groups:
Program Flow

Syntax

Syntax:
scopeName name
Parameters:
name: String
Return Value:
Nothing

Examples

Example 1:
scopeName "main"; while {true} do { scopeName "loop1"; while {true} do { scopeName "loop2"; ... }; };

Additional Information

See also:
breakOut breakTo

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