Jump to content

Script won't start


Recommended Posts

Posted

So.. I wrote a script. Exported it to scripts in Osbot folder. I try to start it in Osbot and nothing happens. Like i put log("Script started") at the top of onStart() and that doesnt show. I've looked over my code and overriden methods in my scripts and everything seems to be correct. if u can helps comment.. or mesage in me in chat box

Posted

You would rather not share log("Wtf??")

 

Do you really think someone is gonna rip your log?

Im assuming he wants to see the whole script. Because the problem is not with onStart(). I said i put a log in there to test if the script even starts. Which it doesn't. Obviously if I was just giving the onStart() method I would have no problem with it.....

Posted

Qubit nobody who knows what they're doing cares about your script lol. We're all capable of recreating it anyways but if you don't feel comfortable posting code for us to analyze you're crap outta luck.

 

Troubleshooting method:

after each line in the onstart add a log so you can see what checkpoint the code stops at. If you're loading a GUI built with JFormDesigner and it's complex, you might have to redo the GUI because I had that same issue.

 example:

 

@Override

public void onStart() throws InterruptedException {

log("a");

UI gui = new UI(this);

log("b");

gui.setVisible(true);

log("c");

while (gui.isVisible()) {

sleep(100);

}

log("d");

 

 

apply method as needed to figure out where the code stops being called.

 

 

 

  • Like 1
Posted (edited)

Im assuming he wants to see the whole script. Because the problem is not with onStart(). I said i put a log in there to test if the script even starts. Which it doesn't. Obviously if I was just giving the onStart() method I would have no problem with it.....

 

If you want help post it, otherwise you will need to debug yourself. 

Nobody wants to steal your scripts, especially if its not even getting past onstart..

Edited by Mysteryy
Posted (edited)

Qubit nobody who knows what they're doing cares about your script lol. We're all capable of recreating it anyways but if you don't feel comfortable posting code for us to analyze you're crap outta luck.

Troubleshooting method:

after each line in the onstart add a log so you can see what checkpoint the code stops at. If you're loading a GUI built with JFormDesigner and it's complex, you might have to redo the GUI because I had that same issue.

example:

@Override

public void onStart() throws InterruptedException {

log("a");

UI gui = new UI(this);

log("b");

gui.setVisible(true);

log("c");

while (gui.isVisible()) {

sleep(100);

}

log("d");

apply method as needed to figure out where the code stops being called.

You can also run OSBot in debug mode to use breakpoint and other debug tools supplied in your IDE.

(Open OSBot -> @login screen -> click about)

Edited by ZappaScripts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...