Jump to content
UBot Underground

Loop a list


Recommended Posts

How do I tell Ubot to cycle through a list, then once I hit the end, start again from the top? Somebody had mentioned how to do that a while ago..can't find it.

Link to post
Share on other sites

set a variable outside before the loop.

 

loop while (#var < $list total)

 

at the end of the loop

add a increment on the #var

 

after it add a if statement

 

if (comparison #var >= $list total)

set #var = 0

else

do nothing

 

 

this will make that loop continually loop, start at the beginning and start over at the end

 

Note your list position should be also determined by #var

for the list item

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...