3
« on: March 18, 2014, 11:48:59 am »
Hi everyone! This is my first post to the forum, mainly because I'm still learning Stencyl and don't yet have much experience to offer, but I have been working with Stencyl for 9-10 months now and have read many of your posts and helpful answers. I've run in to an issue I just can't seem to solve and am hoping someone might be able to educate me a bit. The issue is the fairly common "Error #1009: Cannot access a property or method of a null object reference". This is tied directly to, and happens immediately after, the player in my game is killed. I understand that the error is caused because something is trying to access an actor after its been killed ... but what I don't know is how to utilize the error text to help find the offending code. Is that possible? If not, is there another technique I can learn that will allow me to track down and correct these errors? The error text I'm receiving is as follows:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at MethodInfo-4911()[Source/scripts/SceneEvents_14.hx:547]
at com.stencyl::Engine$/invokeListeners4()[C:\Program Files (x86)\Stencyl\plaf\haxe\lib/stencyl/1,00/com/stencyl/Engine.hx:3907]
at com.stencyl::Engine/draw()[C:\Program Files (x86)\Stencyl\plaf\haxe\lib/stencyl/1,00/com/stencyl/Engine.hx:3072]
at com.stencyl::Engine/postUpdate()[C:\Program Files (x86)\Stencyl\plaf\haxe\lib/stencyl/1,00/com/stencyl/Engine.hx:2644]
at com.stencyl::Engine/onUpdate()[C:\Program Files (x86)\Stencyl\plaf\haxe\lib/stencyl/1,00/com/stencyl/Engine.hx:2578]
Thanks in advance for your help!
Jake