Here is another classic nullpointer exception, haha. I have a constructor in my Bullet1 class for this guardiancounter and once the bullet hits the actor it removes it from the screen (or kills it however you want to call it). Once it is removed I want the object (Bullet1) to tell the guardiancounter to subtract one but when the bullet and the guardian actor intersect I get a run time error.
Actor Guardian; Guardian = getOneObjectAtOffset(0, 0, Guardian.class); if ( Guardian != null) { World world; world = getWorld(); world.addObject(new GuardianHealthBar3(),getX() , 290 ); world.addObject(new Eldardeathdeathrifle(),getX() , getY() ); world.removeObject(Guardian); getWorld().removeObject(this); guardiancounter.subtract(1); return; }