breakOut: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *W([a-z ])" to "$1 - w$2") |
Lou Montana (talk | contribs) m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>") |
||
Line 38: | Line 38: | ||
|r2= [[Anything]] - will return '''value''' | |r2= [[Anything]] - will return '''value''' | ||
|x1= <sqf>scopeName "main"; | |x1= <sqf> | ||
scopeName "main"; | |||
while { true } do { | while { true } do { | ||
scopeName "loop1"; | scopeName "loop1"; | ||
Line 48: | Line 49: | ||
}; | }; | ||
sleep 1; | sleep 1; | ||
};</sqf> | }; | ||
</sqf> | |||
|x2= <sqf>call { | |x2= <sqf> | ||
call { | |||
scopeName "main"; | scopeName "main"; | ||
call { | call { | ||
Line 56: | Line 59: | ||
}; | }; | ||
345 | 345 | ||
}; // call returns 123</sqf> | }; // call returns 123 | ||
</sqf> | |||
|x3= <sqf>call { | |x3= <sqf> | ||
call { | |||
scopeName "Main"; // Parent Main | scopeName "Main"; // Parent Main | ||
call { | call { | ||
Line 64: | Line 69: | ||
"String" breakOut "Main"; // Will break out of child main and return "String" to parent main | "String" breakOut "Main"; // Will break out of child main and return "String" to parent main | ||
}; | }; | ||
};</sqf> | }; | ||
</sqf> | |||
|seealso= [[scopeName]] [[breakTo]] [[exitWith]] | |seealso= [[scopeName]] [[breakTo]] [[exitWith]] | ||
}} | }} |
Latest revision as of 19:42, 3 September 2024
Description
- Description:
- Breaks out of the scope with given name.
- Groups:
- Program Flow
Syntax
- Syntax:
- breakOut name
- Parameters:
- name: String - name of the scope which was previously set with scopeName. "" will exit the current scope (see also exitWith)
- Return Value:
- Nothing
Alternative Syntax
- Syntax:
- value breakOut name
- Parameters:
- value: Anything - a value to return
- name: String - name of the scope which was previously set with scopeName. "" will exit the current scope (see also exitWith)
- Return Value:
- Anything - will return value
Examples
- Example 1:
- Example 2:
- Example 3:
Additional Information
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
Categories:
- Scripting Commands
- Introduced with Armed Assault version 1.00
- ArmA: Armed Assault: New Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Program Flow