So, I'm getting a NullPointerException whenever I try to run this scenario. It says the problem lies at:
It doesn't like "mouseXcalc = mouse.getX();" and probably won't like the next one either. I've used almost identical code in another method (just the mouseXcalc variable was different) and it works fine. What's my problem here? I can post more of the code if needed, this is just the problem part.
MouseInfo mouse = Greenfoot.getMouseInfo(); mouseXcalc = mouse.getX(); mouseYcalc = mouse.getY();