Jump to content
UBot Underground

Getting out of loop


Recommended Posts

Soo hello. Im making a bot and the idea is to put urls in list untill the list runs out. Then i have if for list position = list total. And if thats the case run sub which is out from the loop. But after it have run the sub it hops back in the loop . How can i make it not to do that. After all Urls are put it should just go to next site not start fucking it all over. Thnx

Link to post
Share on other sites

Well i think i described the problem pretty well. I have sub outside the loop and run sub inside. It does like it should and runs the sub. But then it just continues from the "run sub" which is inside the loop and keeps looping instead of continuing from the sub . I don't recall having this problem before and i have used this succesfully in few other bots i made.

Link to post
Share on other sites

ok let me get this straight runs loop goes off to run sub then returns and starts running the loop from the begining or from where it left off??

 

pftg4

Link to post
Share on other sites

I need to see the bot in order to pinpoint whatever the problem is. It's probably something minuscule, but it's a problem that needs to be seen to be solved.

Link to post
Share on other sites

One thing not very clearly explained is how many times you have the loop set to run. I am trying to figure out if your explanation is describing %List Total as the number of times to run the loop:

 

"Then i have if for list position = list total"

On the surface it would appear some node in the sub is sending it back to the loop, OR it doesn't have the appropriate condition to exit it (i.e. it is set to run more loops than you intended). But Lilly is right, it really needs to be seen.

Link to post
Share on other sites

Okey. Sorry, was bit probably bit angry last night due the error and spent time trying to figure it out. Here is the bot in attachment. it also has folder called data which has some information for lists so you don't need open them every time. Youll need some kind of list of URLs tho, should not be a problem :) the "RSS" open file box is not needed since i did not get that far yet. Also You need put the data folder to your \program files\UBOT\ since the developer tool runs from there.

 

For some reason it did not let me upload with attachment so here is DL link

 

http://g5y.net/erroz.rar

Link to post
Share on other sites

your description of what is happening is a little unclear, but what I notice in this script is that you run the sub from inside the same sub. this creates something called a recursion, and is generally something to be avoided. while I don't fully understand the problem, I think you'll be able to fix it if you restructure your code in a way that avoids these recursions.

Link to post
Share on other sites

your description of what is happening is a little unclear, but what I notice in this script is that you run the sub from inside the same sub. this creates something called a recursion, and is generally something to be avoided. while I don't fully understand the problem, I think you'll be able to fix it if you restructure your code in a way that avoids these recursions.

 

No thats not the problem only problem is when it should run the sub "valmis" i put the first Run sub inside it becosuse it did not work otherwise. I dunnno this really have not happened before. The problem is It runs the sub "Valmis" But after that it continues running from where it says "Run sub" instead of continuing to end of the script after Sub "valmis"

 

Normally i use the run sub to hop some place mostly out of the loop. This has worked before

 

For example in This Youtube Comment scraper check it out :)

Comment scraper.ubot

Link to post
Share on other sites

Then how can i get out from the loop if it will loop pretty much infinite(actually came up with some kind of plan.make it set loop to 1, then it should have done it and wont loop again ?, but stil}. And if you check the Youtube comment scraper i attached its working just like that .

Link to post
Share on other sites

there are two ways - one is to make sure you loop the correct number of times. if that is indeterminable, then the answer is to use a while loop, which will loop for as long as a certain condition is met. it sounds like a while loop is what you need to use here.

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...