Jump to content
UBot Underground

Error correcting options


Recommended Posts

So this program would own all if it had one simple option. It might but I am missing it. I use automate for most of my automation needs because on error (Small option on each steep) you can tell it to go to line or to tag not braking the loop and retrying until it works. I may be missing something here but in ubot it seems like you have to add IF after every steep and then toss a ton of steeps inside that if and pray the error corrects before having to add another IF in a IF and then a IF in a IF in a IF, Etc Etc(Could end up having to add hundreds of theses and having this after every single steep in the program!). Let say your using a crappy proxy connection for internet or dial up and a webpage dose not load correctly, in ubot it seems its impossible to correct this issue without a million IF steeps and IFs inside of IFs . Why not make it simple on us and add a simple go to tag or go to steep, this way if a page dose not load you can back track retrying the steeps again and it will keep doing this until the page is successfully loaded and not brake your loop or have to start the program all over again (If you set the tag or tell it to go back to some steeps in your loop). 

 

I am new to ubot and this option may be hidden in ubot already and I missed it, but if its not included this seems like a pretty important thing to have and that almost all of the other automation programs already do. If this option is not in there it will be almost impossible to make this program reliable as it would depend on your internet connection always being 100% and the servers it connects to being 100%.

Edited by tech180
Link to post
Share on other sites

If all your if statements still don't deal with the error you can use define commands to have it move on to something else.

 

A define command is basically creating a custom command.  You can then call on that command anywhere in the script you like.

Link to post
Share on other sites
If all your if statements still don't deal with the error you can use define commands to have it move on to something else.

 

A define command is basically creating a custom command.  You can then call on that command anywhere in the script you like.

I will have to look into that. Will the custom commands allow you go back to the start of the loop without starting it over some how? What I do in other programs is I have on error go to line 61 or on error go to tag. Just makes it redo the current steeps until the finish successful. 

Link to post
Share on other sites

I am also fairly lost on this. I've found a few codes but they're not working for me. I would like the script or loop to restart when the page comes to an error but they're not working the way I would like. Any help would be amazing. 

Link to post
Share on other sites

Ok guys, this is experience talking. And don't be offended. The problem is not with the program but the programmer. I too had a lot of these grrrr, I can't seem to get what I want moments and you will have them on the onset of programming in any language - no matter how easy the language is.

 

What you need to do is really think about what you need done. There is no way to jump around like a 'go to' statement because it makes for really bad programming.

 

Think, think, think when designing a new bot. We all want to jump into the deep end of the pool but if we don't plan first then we plan to fail.

 

For example on the comment made by JackCrow - if you need to have it restart when an error occurs in the page, then you need to plan for that in advance. One way I've found is I'll wrap that segment of code in a 'loop while' statement. Before that loop while, I'll set a variable like '#error status' and I'll set it to 'error'. Then in the loop while, I'll say, loop while #error status is equal to error. If the page doesn't work, it will loop automatically. If it does work, I'll shift the value for #error status to the value of 'none'. This will break that section of code out of the loop and continue merrily along.

 

So this just doesn't sound like a rank - not meant too, here's some code to illustrate what I'm saying...

 

set(#error status"error""Global")
loop while(#error status = "error") {
    alert("doing stuff here.")
    comment("let\'s say that all went well and I\'m about done with this code.
I\'ll now set the error status to \'none\'.")
    set(#error status"none""Global")
}
alert("Tah Dahhh!")

Link to post
Share on other sites

There is no way to jump around like a 'go to' statement because it makes for really bad programming.

 

The problem is not with the 'go to' statement but the programmer if it makes really bad programming

As the costum commands is a 'go to' statement

Link to post
Share on other sites
  • 1 month later...

Ok guys, this is experience talking. And don't be offended. The problem is not with the program but the programmer. I too had a lot of these grrrr, I can't seem to get what I want moments and you will have them on the onset of programming in any language - no matter how easy the language is.

 

What you need to do is really think about what you need done. There is no way to jump around like a 'go to' statement because it makes for really bad programming.

 

Think, think, think when designing a new bot. We all want to jump into the deep end of the pool but if we don't plan first then we plan to fail.

 

For example on the comment made by JackCrow - if you need to have it restart when an error occurs in the page, then you need to plan for that in advance. One way I've found is I'll wrap that segment of code in a 'loop while' statement. Before that loop while, I'll set a variable like '#error status' and I'll set it to 'error'. Then in the loop while, I'll say, loop while #error status is equal to error. If the page doesn't work, it will loop automatically. If it does work, I'll shift the value for #error status to the value of 'none'. This will break that section of code out of the loop and continue merrily along.

 

So this just doesn't sound like a rank - not meant too, here's some code to illustrate what I'm saying...

So your saying your using a loop after ever single command? If you have a team of programmers and months and months to do this sure, it might work, but that seems like it could get pretty messy and sloppy where a simple go to on error would be much easier. If I wanted to spend months developing one program I would use .net and not ubot. I have gave up and went back to using automate as they have ok error correcting and the go to on error commands so no need to make endless loops (That and what takes hours in ubot can be done in minutes in automate because of the go to on error). I have a feeling your going to lose a lot of people to automate when they discover it due to not having this option in ubot. Sloppy programming is adding thousands and thousands of lines of code just to do a simple error correcting task IMO. I remember writing programs in the good ol VB 3 days and getting them done faster and more reliable.

Edited by tech180
Link to post
Share on other sites

The problem is not with the 'go to' statement but the programmer if it makes really bad programming

As the costum commands is a 'go to' statement

How would you deal with an unreliable internet connection in ubot? I see 1 way, loop loop loop loop loop loop until infinity. Now that is VERY bad programming adding all that not needed code.

Edited by tech180
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...