August 19, 20205 yr 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, 20205 yr by nills3
August 19, 20205 yr 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
August 19, 20205 yr 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, 20205 yr by Explv
August 19, 20205 yr 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, 20205 yr by FuryShark
Create an account or sign in to comment