trainux Posted May 25, 2018 Share Posted May 25, 2018 I try to execute it and when you press "Login" it sends the following error: Image hidden due to name showing Quote Link to comment Share on other sites More sharing options...
Chris Posted May 25, 2018 Share Posted May 25, 2018 its your script Quote Link to comment Share on other sites More sharing options...
trainux Posted May 25, 2018 Author Share Posted May 25, 2018 5 minutes ago, Chris said: its your script my script only works without problem, and the script "A Simple Login Handler" copy and paste it. I do not understand what could cause one to harm the other. Quote Link to comment Share on other sites More sharing options...
Chris Posted May 25, 2018 Share Posted May 25, 2018 6 minutes ago, trainux said: my script only works without problem, and the script "A Simple Login Handler" copy and paste it. I do not understand what could cause one to harm the other. It's your script that is causing the error. Where are you using getTabs().open()? Show me the code. Unless you are not properly calling the Login code. Es tu script el que está causando el error. ¿Dónde estás usando getTabs (). Open ()? Muéstrame el código. A menos que no esté llamando correctamente al código de inicio de sesión. Quote Link to comment Share on other sites More sharing options...
trainux Posted May 25, 2018 Author Share Posted May 25, 2018 5 minutes ago, Chris said: It's your script that is causing the error. Where are you using getTabs().open()? Show me the code. Unless you are not properly calling the Login code. Es tu script el que está causando el error. ¿Dónde estás usando getTabs (). Open ()? Muéstrame el código. A menos que no esté llamando correctamente al código de inicio de sesión. I call the login code like this: LoginEvent loginEvent = new LoginEvent("user mail", "password"); getBot().addLoginListener(loginEvent); execute(loginEvent); The call I use it in the "onLoop()" in the following way: @Override public int onLoop() throws InterruptedException{ if (client.isLoggedIn()) { doTasks(); }else { LoginEvent loginEvent = new LoginEvent("user mail", "password"); getBot().addLoginListener(loginEvent); execute(loginEvent); } return 1000; } As a result, I get this: https://photos.app.goo.gl/KH25G5oSHPhdbnsC3 Quote Link to comment Share on other sites More sharing options...
Chris Posted May 25, 2018 Share Posted May 25, 2018 3 minutes ago, trainux said: I call the login code like this: LoginEvent loginEvent = new LoginEvent("user mail", "password"); getBot().addLoginListener(loginEvent); execute(loginEvent); The call I use it in the "onLoop()" in the following way: @Override public int onLoop() throws InterruptedException{ if (client.isLoggedIn()) { doTasks(); }else { LoginEvent loginEvent = new LoginEvent("user mail", "password"); getBot().addLoginListener(loginEvent); execute(loginEvent); } return 1000; } As a result, I get this: https://photos.app.goo.gl/KH25G5oSHPhdbnsC3 remove from "onLoop()" getBot().addLoginListener(loginEvent); What does your "onStart" look like Quote Link to comment Share on other sites More sharing options...
Nym Posted May 25, 2018 Share Posted May 25, 2018 22 minutes ago, trainux said: I call the login code like this: LoginEvent loginEvent = new LoginEvent("user mail", "password"); getBot().addLoginListener(loginEvent); execute(loginEvent); The call I use it in the "onLoop()" in the following way: @Override public int onLoop() throws InterruptedException{ if (client.isLoggedIn()) { doTasks(); }else { LoginEvent loginEvent = new LoginEvent("user mail", "password"); getBot().addLoginListener(loginEvent); execute(loginEvent); } return 1000; } As a result, I get this: https://photos.app.goo.gl/KH25G5oSHPhdbnsC3 client.isLoggedIn() returns true on the welcome screen (don't know what its called but after you login there's the "Click here to play" thing), your script is trying to run the doTasks() on that screen and that's where your issues I think are coming from. Quote Link to comment Share on other sites More sharing options...
trainux Posted May 25, 2018 Author Share Posted May 25, 2018 1 hour ago, Chris said: remove from "onLoop()" getBot().addLoginListener(loginEvent); What does your "onStart" look like The "comprobacion()" function changes the state of a Boolean: @Override public void onStart(){ log("Arranco"); runTime = new Timer(0); comprobacion(); mensaje = "Inicio"; } ____________________________________________________________________________________________ 1 hour ago, Nimmogel said: client.isLoggedIn() returns true on the welcome screen (don't know what its called but after you login there's the "Click here to play" thing), your script is trying to run the doTasks() on that screen and that's where your issues I think are coming from. Modify my "onLoop ()" to the following: @Override public int onLoop() throws InterruptedException{ if(sleep) { log("work time"); LoginEvent loginEvent = new LoginEvent("user mail", "password"); getBot().addLoginListener(loginEvent); execute(loginEvent); } return 500; } As a result, I get this: https://photos.app.goo.gl/yoOTCk0zId54PweS2 Quote Link to comment Share on other sites More sharing options...