Alright, so recently I've been working on this game, and I keep getting this java.lang.NullPointerException that's really annoying me.
I'm not a novice programmer, and I've had experience debugging before, but this one I can't understand.
So here's the code:
(I'm not releasing the full code because only this part relates to the problem)
And the error points to the second line.
Now, inside my Ground class I have this method:
I've checked, and the Ground's type variable is set and everything, but I keep getting this error.
Anyways, if you could help, that'd be great.
Ground a = (Ground) getOneIntersectingObject(Ground.class); int aType = a.getType();
public int getType() { return type; }