Skip to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Need someone to check my work. Getting NPE

Featured Replies

Hello! I'm new to this community, but i'm not new to java and when i realized that i could create a script using java I jumped at the chance.

 

I'm getting an NPE and it crashes(not really, just very slow and unresponsive) OSBOT, i can't even look at the logs as it just fills up with useless messages that tell me I have an NPE.

I would really love to look at the stacktrace and see which lines I need to specifically look at but it's too quick for me.

 

I've been trying to use debug messages and see where the problem is myself.

 

Hopefully someone can take the time to search where the NPE would be.

 

Note that not all values aren't filled as they are not being used yet. 

 

Much appreciated ~WonderfulMang

 

Main.class

HatchetType

TreeType

WoodcuttingState

WoodcuttingStyle

DraynorStyle

 

 

This is all of my current code.

Didn't go through all of those but from a quick look I can tell you that there's a problem in your WoodcuttingStyle constructor. It takes 3 arguments, an area name, an area and a main instance. You don't store that main object that is passed anywhere even though you created a main field in your class (which remains null) and you are using that later on in your code, which probably generates NPE's.

 

ec900e6d5a.png

 

thats supposed to be 

public WoodcuttingStyle(String areaName, Area bank, Main main) {
        this.areaName = areaName;
        this.bank = bank;
        this.main = main;
    }
  • Author

 

Didn't go through all of those but from a quick look I can tell you that there's a problem in your WoodcuttingStyle constructor. It takes 3 arguments, an area name, an area and a main instance. You don't store that main object that is passed anywhere even though you created a main field in your class (which remains null) and you are using that later on in your code, which probably generates NPE's.

 

ec900e6d5a.png

 

thats supposed to be 

public WoodcuttingStyle(String areaName, Area bank, Main main) {
        this.areaName = areaName;
        this.bank = bank;
        this.main = main;
    }

Nice catch! I suppose I completely missed that on my part. Thank you smile.png

Edit: seems to have fixed my problem. Thank you very much.

Edited by WonderfulMang

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.