Goto loops: Difference between revisions

From Scriptwiki
Jump to navigation Jump to search
m changed a link
m added gatecory
Line 10: Line 10:
   [[Goto loops|goto]] nexti
   [[Goto loops|goto]] nexti
  }
  }
[[Category:Commands]]

Revision as of 10:44, 31 October 2006

You can use goto command to jump from one point to another in a script.
Goto's aren't used very much.

alias channels {
  var %i , %chans 
  :nexti
  inc %i
  if (%i > $chan(0)) { return %chans }
  var %chans = %chans $chan(%i)
  goto nexti
}