# For Each Integer

Grammar — For each integer var from s to e with increment increment, do (Actions)
FlagsSubFunctions | Action

Executes a For Loop using an integer value. This will run the action set included in the For Loop a number of times determined by the Start, End, and Increment parameters, increasing the integer variable by the Increment parameter each time. For example: If you set up a For Loop to start at 1, end at 10, increment by 1, and made a single “Chat Message” action inside of the For Loop that converted the integer parameter into text, it would count from 1 to 10 in the chat message area.

# Arguments

  • anyvariable — Variable
  • int — Start
  • int — End
  • int — Increment

Returns — void

#INITAUTOVAR(ae,e)
#INITAUTOVAR(ai,increment)
#PARAM(var) = #PARAM(s);
for ( ; ( (#AUTOVAR(ai) >= 0 && #PARAM(var) <= #AUTOVAR(ae)) || (#AUTOVAR(ai) < 0 && #PARAM(var) >= #AUTOVAR(ae)) ) ; #PARAM(var) += #AUTOVAR(ai) ) {
    #SUBFUNCS(actions)
}

Category: General / Loops

# Examples

— None found —