Dioxin 29 Share Posted January 27, 2015 (edited) Calling stop() doesn't prevent the script from continuing to onLoop(). I took a look at setState(ScriptManager.State), but the enum ScriptManager.State apparently isn't accessable (says it is in the API, but doesn't exist when trying to access it). I do not want the script to reach onLoop() after attempting to stop it in onStart(). I'm working with a JOptionPane which sets some properties for the bot (where to bot, the antiban rate); this pane is displayed when onStart() gets called. If the script user decides to X out of the pane or click cancel, I want to stop the script, before it hits onLoop(). Since I initialize the properties only if the script user clicks accepts (assumg he wants to exit the script on X or cancel), I get a NullPointerException for the properties not being set by the time onLoop() comes around. I don't want to initialize the properties if the user clicks cancel or Xs out (doesn't make sense to do so). I want the script to completely exit. I'm working on someone else's script, and the method they used to attempt to stop the script was stop(). I'm looking for a way to manually end the script without it continuing onto the actual processing part (onLoop()). How can I do this? I'm sure you guys don't need a code example, but just to be safe: (omitted a lot of things in script owner's respect) public void onStart() { int choice = /* init JOptionPane */; if(choice == JOptionPane.OK_OPTION) { //init bot properties } else { stop(); //stop script completely; don't continue to onLoop } } Couldn't find the answer to this anywhere else, so sorry if it has been asked before Edited January 27, 2015 by Dioxin Ericthecmh 1 Link to comment Share on other sites More sharing options...
Pandemic 2469 Share Posted January 27, 2015 Fixed, and will be in the next version, thanks for the report Dioxin 1 Link to comment Share on other sites More sharing options...
Dioxin 29 Author Share Posted January 27, 2015 Fixed, and will be in the next version, thanks for the report Ah, was unaware it was an actual problem or I would have posted in the correct section. Thanks for the quick reply Link to comment Share on other sites More sharing options...
Recommended Posts