Gorn 4 Posted August 5, 2020 How do you handle client throwing an error generally? I'm looking for some boolean or something that activates when there is any error. I'm getting an "[ERROR]16:11:30: You're checking a null tile!" error that doesn't give any more info (like what tile, which line) but I want the bot to just to reset when there is any error.
TheCloakdOne 389 Posted August 5, 2020 Hey dude, you need to handle your null checks within the script, so for example i guess you are doing the following? getWalking.walk({SOME_TILE}) You need to make sure {SOME_TILE} is not null before calling walk: if({SOME_TILE} != null) getWalking.walk({SOME_TILE}); this will stop your script from crashing. i wouldnt advise wrapping your script in a try/catch but rather handle the nulls an errors correctly within the script
Gorn 4 Author Posted August 5, 2020 thx, you're right it should be fixed with a null check currently I can't replicate the error and it didn't say the line that caused it but I still feel like implementing some sort of 'last resort' error check. like if I let it run over night and it stops from some phantom error (it's probaly from my super convoluded custom 'anti-ban') it could just log out and switch to different account, but it's not a priority now anyway
Gorn 4 Author Posted August 5, 2020 I mean I could have definetly avoided the error in the first place by being more disciplined about the null checks, unfortunetly I usually only add them after the error pops up, maybe it will show the line if I start the client through console
PhilBox 24 Posted August 6, 2020 If you use eclipse, you can Right click your project -> "Run As" -> "Boot - org.dreambot" Doing this provides you with a console that will give more info about NPEs etc.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.