nills3 Posted August 19, 2020 Share Posted August 19, 2020 (edited) Hello. This thing really bugs me. Recently switched from poopbot (lmao it automatically changed to poopbot that's hilarious. heard some rumours about the source code being stolen) to osbot so I'm still tryna learn the ropes. My script crashes, doing the simplest thing in the tutorials here. And I can't check the logger because it gets stuck, but I am still logged in-game. If you're wondering what the code is; final Bank bank = new Bank(); if (bank != null) { log("Bank isnt null"); bank.open(); } else { log ("Bank is null"); } Tried doing it both this way, and this way; NPC banker = npcs.closest("Banker"); if (banker != null) { banker.interact(("Bank")); sleepR(); bank.depositAll(); sleepR(); Not sure why this doesn't work. But my main issue is the logger. I need to see what causes the crashes so.. Any ideas? Does it get logged anywhere else where I can check? Edited August 19, 2020 by nills3 Quote Link to comment Share on other sites More sharing options...
Protoprize Posted August 19, 2020 Share Posted August 19, 2020 7 minutes ago, nills3 said: Hello. This thing really bugs me. Recently switched from poopbot (lmao it automatically changed to poopbot that's hilarious. heard some rumours about the source code being stolen) to osbot so I'm still tryna learn the ropes. My script crashes, doing the simplest thing in the tutorials here. And I can't check the logger because it gets stuck, but I am still logged in-game. If you're wondering what the code is; final Bank bank = new Bank(); if (bank != null) { log("Bank isnt null"); bank.open(); } else { log ("Bank is null"); } Tried doing it both this way, and this way; NPC banker = npcs.closest("Banker"); if (banker != null) { banker.interact(("Bank")); sleepR(); bank.depositAll(); sleepR(); Not sure why this doesn't work. But my main issue is the logger. I need to see what causes the crashes so.. Any ideas? Does it get logged anywhere else where I can check? 1. Check if player is in correct area to bank 2. use getBank().open 3. Use conditional sleep to sleep until bank is open Quote Link to comment Share on other sites More sharing options...
nills3 Posted August 19, 2020 Author Share Posted August 19, 2020 Thank you for trying to help. Quote Link to comment Share on other sites More sharing options...
Explv Posted August 19, 2020 Share Posted August 19, 2020 (edited) 42 minutes ago, nills3 said: Thank you for trying to help. Remove this: final Bank bank = new Bank() You don't instantiate `Bank`, it's already instantiated for you and provided via the MethodProvider. If you are in your main Script class, you can access it using getBank() Have a read through my tutorial if you haven't already, it might help you out a bit: https://osbot.org/forum/topic/115124-explvs-scripting-101/ Edited August 19, 2020 by Explv Quote Link to comment Share on other sites More sharing options...
FuryShark Posted August 19, 2020 Share Posted August 19, 2020 (edited) to add what everyone else said, open logger before you start the script so you can see what error your getting edit: i look at the entire post first. Edited August 19, 2020 by FuryShark Quote Link to comment Share on other sites More sharing options...