Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • error handling


    Gorn

    Recommended Posts

    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.

    Link to comment
    Share on other sites

    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 :)

     

    Link to comment
    Share on other sites

    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

    Link to comment
    Share on other sites

    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

    Link to comment
    Share on other sites

    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.

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.