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
  • Try asking for help in the chatbox
  • Need help with exception error!


    Recommended Posts

    Hi guys, need help with the following error (I am new to Java and scripting, so will appreciate if you can be explicit :-))


    The player levelled up and the following exception error popped: java.lang.NullPointerException






    Can someone please guide me on how should I modify the code to avoid this? Thanks!

    Link to comment
    Share on other sites

    There's not much we can tell you without the stack trace, which should have been printed in the console. :x

    You're making a call somewhere on a null object. This would be like if you're getting nearby chickens and there are no chickens available

    and you call chicken.interact("Attack") anyway, it'll throw an NPE because chicken is null.

    Link to comment
    Share on other sites

    • 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.