Exception exists, why? Does it mean the StatusEvent hasn't been initialize?
SYSTEM: Exception occurred on robocode.StatusEvent
java.lang.NullPointerException
at margaret.Killer.onStatus(Killer.java:258)
at robocode.StatusEvent.dispatch(Unknown Source)
at robocode.Event$EventHiddenHelper.dispatch(Unknown Source)
at robocode.peer.robot.RobotClassManager.dispatch(Unknown Source)
at robocode.peer.robot.EventManager.dispatch(Unknown Source)
at robocode.peer.robot.EventManager.processEvents(Unknown Source)
at robocode.peer.proxies.HostingRobotProxy.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I modified your version, because it uses some variables local to robot.
And it is just running fine.
That means it is your variables what is throwing ...
I want to record the status during the battle, I have overridden this method like this.
Exception exists, why? Does it mean the StatusEvent hasn't been initialize?
SYSTEM: Exception occurred on robocode.StatusEvent
java.lang.NullPointerException
at margaret.Killer.onStatus(Killer.java:258)
at robocode.StatusEvent.dispatch(Unknown Source)
at robocode.Event$EventHiddenHelper.dispatch(Unknown Source)
at robocode.peer.robot.RobotClassManager.dispatch(Unknown Source)
at robocode.peer.robot.EventManager.dispatch(Unknown Source)
at robocode.peer.robot.EventManager.processEvents(Unknown Source)
at robocode.peer.proxies.HostingRobotProxy.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I modified your version, because it uses some variables local to robot.
And it is just running fine.
That means it is your variables what is throwing ...
Please use our time wisely, we are busy ;-)