forTime and forCondition are loops and belong to flow control also:
forTime takes a single argument "time" - it repeats the loop until "time" in milliseconds has passed since the initialization of the loop. See an example of forTime() below:
...
$i = 0
forTime(2000)
console.printLine($i, ": Hello World")
script.wait(500)
++$i
end
...
forCondition takes a single boolean value as argument. The loop will be executed as long as the argument is true. In this case "$i < 5" translates to "lesser($i, 5)" which results in a boolean value, which is used as the forCondition argument. See example of forCondition() below.
...
$i = 0
forCondition($i < 5)
console.printLine("$ = ", $i)
++$i
end
...
TODO: for, break, continue
- Syntax
- Data types
- Flow control - if, elseif, else
- Flow Control - switch, case, default
- Flow Control - loops
- Classes
- Classes API
- Functions
- BuiltIn functions
- Functions
- Operators
- Syntax
- Events
- MinitScript, see README.md
- MinitScript - How to build, see README-BuildingHowTo.md
- MinitScript - How to use, see README-Tools.md
- MinitScript - ToDo list, see README-ToDo.md
- The Mindty Kollektiv Discord Server