DylanSRT Posted October 23, 2018 Posted October 23, 2018 Hi Developers, What exactly was changed in the 24 update because it broke all of my GUIs lol. They go black like the picture below and entire client crashes as well as original client (I'm using mirror mode btw). Even logger can't output anything before it freezes. Never had a problem with this code before 24. I can provide a sample code if you don't think it was something on your end. @Token Can't bother Alek anymore , but could you look into this please mate. Thanks
ScummyBotter Posted October 23, 2018 Posted October 23, 2018 Same thing happened to me, I managed to solve it by removing any sleeps and checks that were in my onStart() and moved them to my onloop with a toggle, might be worth checking that out
Ragnar Lothbrok Posted October 23, 2018 Posted October 23, 2018 2 minutes ago, ScummyBotter said: Same thing happened to me, I managed to solve it by removing any sleeps and checks that were in my onStart() and moved them to my onloop with a toggle, might be worth checking that out Just out of curiosity - why did you have sleeps in your onStart()?
ScummyBotter Posted October 23, 2018 Posted October 23, 2018 3 minutes ago, Ragnar Lothbrok said: Just out of curiosity - why did you have sleeps in your onStart()? I was waiting on gui input in my onStart, setting settings (like zoom etc), reading the user setup etc. Apparently it's bad practice I think so I'll stop doing that now.
DylanSRT Posted October 23, 2018 Author Posted October 23, 2018 1 minute ago, ScummyBotter said: I was waiting on gui input in my onStart, setting settings (like zoom etc), reading the user setup etc. Apparently it's bad practice I think so I'll stop doing that now. I don't have any sleeps in my GUI class and I just initialize it in OnStart. Indeed just by taking out the reference to my GUI, the script works fine.. But why did this start happening? Kind of annoying now that I have to update everything. Can we get option to use previous version or a fix please devs?
Ragnar Lothbrok Posted October 23, 2018 Posted October 23, 2018 57 minutes ago, ScummyBotter said: I was waiting on gui input in my onStart, setting settings (like zoom etc), reading the user setup etc. Apparently it's bad practice I think so I'll stop doing that now. Yeah probably not a good idea - I usually have a variable that tells the script when the gui is compete - just set it to true on the start button action listener.
Xanthippie Posted October 23, 2018 Posted October 23, 2018 My bots got stuck in the bank after a break because the client didn't switch to putting in my pin?
kushad Posted October 24, 2018 Posted October 24, 2018 My gui also broken bot is all of sudden crashing/freezing for some reason super laggy to stop start script also
ScummyBotter Posted October 24, 2018 Posted October 24, 2018 7 hours ago, Ragnar Lothbrok said: Yeah probably not a good idea - I usually have a variable that tells the script when the gui is compete - just set it to true on the start button action listener. I have the same thing, but you need to wait on that variable to become true before you start doing the main section of the script right? That's what I was waiting on, essentially had these in my onStart, the second one was what was causing it to break for me: private void makeGUI() { frame = new GUI(); frame.setVisible(true); } private void waitForGUI() throws InterruptedException { while(!frame.getStartButtonState()){ sleep(200); } frame.setVisible(false); }
Ragnar Lothbrok Posted October 24, 2018 Posted October 24, 2018 1 hour ago, ScummyBotter said: I have the same thing, but you need to wait on that variable to become true before you start doing the main section of the script right? That's what I was waiting on, essentially had these in my onStart, the second one was what was causing it to break for me: private void makeGUI() { frame = new GUI(); frame.setVisible(true); } private void waitForGUI() throws InterruptedException { while(!frame.getStartButtonState()){ sleep(200); } frame.setVisible(false); } Nah I just do a check on my onLoop method like this: i if (started) { // DO SHIT } return 500; 1
sonda Posted October 24, 2018 Posted October 24, 2018 5 hours ago, Ragnar Lothbrok said: Nah I just do a check on my onLoop method like this: i if (started) { // DO SHIT } return 500; I do the same. Works great.