[SOLVED] How to solve an ActionScript Error?

Winkley

  • Posts: 22
Hello there, I'm using the DropBlox kit to create my game, I've added the Goal Zone behavior.

When I reach my "Goal Zone" this pops up:

Code: [Select]
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Function/<anonymous>()[C:\Documents and Settings\JD\My Documents\StencylWorks\sandbox\flash\scripts\Design_4_4_BallGoalZone.as:53]
at stencyl.api.engine::TimedTask/update()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/TimedTask.as:37]
at stencyl.api.engine::GameState/innerUpdate()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1377]
at stencyl.api.engine::GameState/postUpdate()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1311]
at stencyl.api.engine::GameState/update()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1293]
at org.flixel::FlxGame/update()[/Users/jon/Desktop/stencyl/plaf/flash/flixel/org/flixel/FlxGame.as:354]



« Last Edit: July 12, 2011, 11:46:31 am by Winkley »

Rob

  • *
  • Posts: 1268
I noticed timed task as being one of the items flagged in the log. Please take a look at the stencylpedia article and see if it helps.

http://www.stencyl.com/draft/edit/7
GOLDEN RULE #1 : SAVE YOUR GAMES FREQUENTLY
IOS/XCODE DEBUGGING
http://www.stencyl.com/help/view/xcode-ios-troubleshoot/
WATCH STENCYLWORKS VIDEO TUTORIAL BY SUNRISEKINGDOM
http://www.youtube.com/watch?v=KDfRfjzr9j4&feature=channel_video_title

Winkley

  • Posts: 22
That page gives an error^^

coleislazy

  • *
  • Posts: 2607
You may want to take a screenshot of the behavior and post it here, or upload the game to StencylForge and make it public so we can take a look at it. Its hard to debug without seeing the behavior.

Winkley

  • Posts: 22
Here's the screenshot.

coleislazy

  • *
  • Posts: 2607
Make sure you have drawn a region on your level and set it on the goal zone behavior page of the scene.

Winkley

  • Posts: 22
I am absolutely sure!

coleislazy

  • *
  • Posts: 2607
Everything appears fine with the behavior, and I can't seem to "break" the game myself, so I'm not sure where that error is coming from. Usually that error happens when you have an attribute that refers to an object that has not yet been created or which has already been killed.

If you upload the game to StencylForge, I can take a look at it.

Alexin

  • *
  • Posts: 3130
Everything points to Next Scene being null. Did you set it?
"Find the fun"
alexin@stencyl.com

Winkley

  • Posts: 22
Oh, I just noticed you have to set the last level's Next Scene to something too :3
I feel stupid, thanks for you help.


[SOLVED]