UBot Underground: break out a for loop - UBot Underground

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

break out a for loop

#1 User is offline   some_guy Icon

  • Advanced Member
  • PipPipPip
  • Group: UBot Customers
  • Posts: 134
  • Joined: 24-November 09

Posted 08 February 2010 - 10:52 PM

I have a for loop that loops 999 times as I need to amend the list that is being looped within the for.
The listtotal parameter appears to be set at the beginning of the loop and isn't dynamically checked each loop (from my test) hence why I need to set a large loop to assure the loop loops enough terms, however, this method requires the ability to manually break the loop.

I am sure I was able to break out a for by using

if (a=B)
then
return value

where value was just a nominal string.

Now this isn't working, the return is definitely hit as have added a javascript alert() to the then statement, but the return is ignored and the loop goes round again.

Any ideas?
0

#2 User is offline   Aaron Nimocks Icon

  • Advanced Member
  • Icon
  • Group: Moderators
  • Posts: 442
  • Joined: 22-November 09
  • LocationVirginia Beach

Posted 08 February 2010 - 11:33 PM

Instead of a loop use the while statement.

Then when you want to break out change the value of a variable so it will no longer "while".
0

#3 User is offline   some_guy Icon

  • Advanced Member
  • PipPipPip
  • Group: UBot Customers
  • Posts: 134
  • Joined: 24-November 09

Posted 09 February 2010 - 12:05 AM

View PostAaron Nimocks, on 08 February 2010 - 11:33 PM, said:

Instead of a loop use the while statement.

Then when you want to break out change the value of a variable so it will no longer "while".


Doh, of course !!! Thanks for reply
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users