Skip to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Onloop() Won't Start As Of 1.2.2

Featured Replies

Since update 1.2.2 I have recieved numerous bug reports that my script would no longer function, so by nature I loaded it up and attempted to get it to work, no luck.

 

I added some debug steps into it to see what was going on, and once again. onLoop() won't do anything.

 

 

    @Override    public    int onLoop() throws InterruptedException {        log("Boolean Started = " +started);        if(started) {            debugSession++;            log("Currently Debugging Times Processed: " +debugSession);            state = setState();            return handleState(state);        } else return 2500;    }

 

started does return true, because I have it in the GUI to let me know when it's changed, although onLoop() will not execute, this was working fine on 1.2.1

 

 

 

Please Note: It's been a constant problem were onLoop() will randomly stop working, it was claimed to be fixed in 1.1.6 i believe, if you manage to somehow get onLoop() to run, than it will surely stop running randomly. May take 5 minutes, may take an hour.

 

 

 

Yea
this is a really weird bug, most of the time it won't loop but after
restarting the bot multiple times it may work once, then stop working.
Not sure why...

 

 

Are you certain that handleState() doesn't return a negative number?

Nevermind, I see what you're saying. I have not been experiencing this.

 

 

I was also having an issue similar to this. After restarting the client 5 times it finally worked.

 

 

Exact thing has been happening to me!

Edited by XenoTools

I was also having an issue similar to this. After restarting the client 5 times it finally worked.

Are you certain that handleState() doesn't return a negative number?

Nevermind, I see what you're saying. I have not been experiencing this.

Edited by DarkStorm

Yea this is a really weird bug, most of the time it won't loop but after restarting the bot multiple times it may work once, then stop working. Not sure why...

  • Author

Are you certain that handleState() doesn't return a negative number?

Nevermind, I see what you're saying. I have not been experiencing this.

I know you crossed it out, but yes I'm completely sure, besides that would be slightly irrelevant considering it's not even printing something BEFORE the return.

I haven't experienced any issues with it so far. It might be your code that is causing this problem.

Edited by Xyssto

  • Author

 

I haven't experienced any issues with it so far. It might be your code that is causing this problem.

 

I doubt it's my code, considering the following script will not execute:

public class TestScript extends Script {     public int onLoop() {          log("Testing");          return 1500;     }     public void onStart() {         log("Started");    }

 

I haven't experienced any issues with it so far. It might be your code that is causing this problem.

 

I doubt it's my code, considering the following script will not execute:

public class TestScript extends Script {     public int onLoop() {          log("Testing");          return 1500;     }    public void onStart() {         log("Started");    }}

Keep in mind, it prints Started, but onLoop() never starts. Seems like numerous other members are having this issue.

I deleted my osbot folder and now everything seems to be working again. I'll post if it stops working

  • Author

I have @override in my actual scripts, I wrote that one up inside the forum post, which is why there were not any imports.

I have @override in my actual scripts, I wrote that one up inside the forum post, which is why there were not any imports.

Idk i was just guessing :P

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.