Creating a new call to function breaks flash

Rukiri

  • Posts: 88
example.

var test:Class = new Class(); (just pretend that's what you named your class and this is just a blank file)

When you give a call inside a behavior and test the game you get no errors and you'll see Stencyl finalizing and loading the game quickly then just dissapears and you go back to the editor.

I do not know if this is a issue with me itself but I have seen a A*pathfinder example as well that has the same problem.

If it's me fine, link me somewhere but the same method works in every other language and Flash game library and I've tested it with flixel, flashpunk enough to know it's more to do with stencyl.

Alexin

  • *
  • Posts: 3127
How does the behavior look like? (Post the entire code , please).

Post the logs too.
"Find the fun"
alexin@stencyl.com

coleislazy

  • *
  • Posts: 2607
Your logs should give the full error message from the compiler. SW may not display errors in freeform code like it does with behaviors.

Rukiri

  • Posts: 88
Errors.
Code: [Select]
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at stencyl.api.engine.actor::Actor/updateTweenProperties()[/home/stencyl/stencyl.net/jenkins/jobs/StencylWorks-Dist/workspace/plaf/flash/root/stencyl/api/engine/actor/Actor.as:1291]
at stencyl.api.engine.actor::Actor/internalUpdate()[/home/stencyl/stencyl.net/jenkins/jobs/StencylWorks-Dist/workspace/plaf/flash/root/stencyl/api/engine/actor/Actor.as:871]
at stencyl.api.engine::GameState/createActor()[/home/stencyl/stencyl.net/jenkins/jobs/StencylWorks-Dist/workspace/plaf/flash/root/stencyl/api/engine/GameState.as:1008]
at stencyl.api.engine::GameState/loadActors()[/home/stencyl/stencyl.net/jenkins/jobs/StencylWorks-Dist/workspace/plaf/flash/root/stencyl/api/engine/GameState.as:774]
at stencyl.api.engine::GameState/loadScene()[/home/stencyl/stencyl.net/jenkins/jobs/StencylWorks-Dist/workspace/plaf/flash/root/stencyl/api/engine/GameState.as:543]
at stencyl.api.engine::GameState/begin()[/home/stencyl/stencyl.net/jenkins/jobs/StencylWorks-Dist/workspace/plaf/flash/root/stencyl/api/engine/GameState.as:297]
at Function/<anonymous>()[/Users/erick/Downloads/autobuild/preview/scripts/MyAssets.as:120]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()


Justin

  • *
  • Posts: 4645
I see no indication from the logs that the preview failed. Could you share the test game?


The actor tweening error isn't related to your test class. I replied to your other thread here about that. (Add an animation to your actor.)
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

Alexin

  • *
  • Posts: 3127
It's a runtime error so it won't show up in logs.

@Rukiri
Quote from: Alexin
How does the behavior look like? (Post the entire code , please).
"Find the fun"
alexin@stencyl.com