do: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "|game5= arma2oa |version5= 1.51 " to "|game5= arma2oa |version5= 1.50 ") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
|game1= ofp | |game1= ofp | ||
|version1= 1.85 | |version1= 1.85 | ||
|game2= ofpe | |game2= ofpe | ||
|version2= 1.00 | |version2= 1.00 | ||
|game3= arma1 | |game3= arma1 | ||
|version3= 1.00 | |version3= 1.00 | ||
|game4= arma2 | |game4= arma2 | ||
|version4= 1.00 | |version4= 1.00 | ||
|game5= arma2oa | |game5= arma2oa | ||
|version5= 1.50 | |version5= 1.50 | ||
|game6= tkoh | |game6= tkoh | ||
|version6= 1.00 | |version6= 1.00 | ||
|game7= arma3 | |game7= arma3 | ||
|version7= 0.50 | |version7= 0.50 | ||
Line 41: | Line 34: | ||
|r1= [[Anything]] | |r1= [[Anything]] | ||
|x1= < | |x1= <sqf> | ||
while { b > a } do | |||
{ | |||
a = a + 1; | |||
}; | |||
</sqf> | |||
|x2= <sqf> | |||
with uiNamespace do | |||
{ | |||
MyUIVar = MyUIVar + 5; | |||
}; | |||
</sqf> | |||
|x3= <sqf> | |||
for "_i" from 1 to 10 do | |||
{ | |||
systemChat str _i; | |||
sleep 0.5; | |||
}; | |||
</sqf> | |||
| | |x4= <sqf> | ||
< | switch (50) do | ||
{ | |||
case 25: { hint "25" }; | |||
}; | case 50: { hint "50" }; // hints "50" | ||
} | case 75: { hint "75" }; | ||
default { hint "nope" }; | |||
}; | |||
</sqf> | |||
|seealso= [[Control Structures]] | |seealso= [[Control Structures]] | ||
}} | }} |
Latest revision as of 14:17, 11 May 2022
Description
- Description:
- Executes code. Used as part of a construct, such as while, with, for and switch. The code is always executed in missionNamespace unless do is used with with as an argument.
- Groups:
- Program Flow
Syntax
- Syntax:
- construct do code
- Parameters:
- construct: While Type (while), With Type (with), For Type (for), Switch Type (switch)
- code: Code
- Return Value:
- Anything
Examples
- Example 1:
- Example 2:
- Example 3:
- Example 4:
Additional Information
- See also:
- Control Structures
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 Operation Flashpoint version 1.85
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Operation Flashpoint: Elite: 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