This site requires JavaScript, please enable it in your browser!
Greenfoot back

danpost's Comments

Back to danpost's profile

Unfortunately, I only have one. Besides, that sounds like quite an endevour and I do not think I would be much into doing something like that at this time.
@darkmist255, I am unfamiliar with the terminology 'LAN network version'. I know 'LAN' stands for 'local area network'; so, would you be referring to having two players on two different computers in the same local network playing a game against each other?
@Gazzzah, thanks. I am happy you are pleased with it.
Yes, you may. That was the purpose of creating it; so other may benefit from it. As far as referencing me, well, it would be nice (but not absolutely neccessary)! Voting is optional, also.
@Game/maniac, sp33dy, and justine Glad you like! Thanks for voting.
danpostdanpost

2012/2/21

Would be good to have some type of change when all the dots are gone (or when you die). A score, a level complete, a new level? Nice, but really needs more.
The 'NullPointerException' is one of the most common run-time error messages. It is telling you that you are trying to do something to nothing as if it were something. That kind of sounds strange, I guess, but in your case, after the fly is removed, it no longer has a world; therefore 'getWorld()' in the next line becomes 'null'; hence, the 'NullPointerException'.
The terminal window is there to assist you. You were getting a message that started with: Line 1: java.lang.NullPointerException Line 2: at Fly.die(Fly.java:135) Line 3: at Fly.act(Fly.java:32) Line 1 tells you why the scenario stopped (the error type) Line 2: tells you where in your code the error occurred (line 135 of the Fly class in the die() method) Line 3: may show where the method was called from (line 32 of the Fly class in the act() method) Lines 2 will not always be immediately after the error type, but will be somewhere in the message (it will be the first one that is recognizably in your scenario)
Reverse the last two lines of code in the Fly class (add the burger before removing fly).