Stencyl 3.4.0 is now out. Get it now!

Bug Issue: Need help with Error 1009: Random Actor Creation


Pages: 1

imp2662

  • Junior Stencyler
July 22, 2017, 11:22:33 pm
Hello Stencyl people!

I'm trying to code a game that spawns actors from a list randomly at set positions without repeating and I'm getting Error 1009.

I've looked over the other posts that deal with this, but I can't seem to come up with a reason why I'd be getting this. My best guess is that it's how I'm managing my list, but I'm stuck.

I've attached a screenshot of the code.

Quote
TypeError: Error #1009: Cannot access a property or method of a null object reference.
   at com.stencyl::Engine/getRecycledActorOfTypeOnLayer()[C:/Program Files (x86)/Stencyl/plaf/haxe/lib/stencyl/1,00/com/stencyl/Engine.hx:2150]
   at com.stencyl::Engine/getRecycledActorOfType()[C:/Program Files (x86)/Stencyl/plaf/haxe/lib/stencyl/1,00/com/stencyl/Engine.hx:2143]
   at com.stencyl.behavior::Script$/createRecycledActor()[C:/Program Files (x86)/Stencyl/plaf/haxe/lib/stencyl/1,00/com/stencyl/behavior/Script.hx:1763]
   at MethodInfo-6383()[Source/scripts/Design_5_5_randomspawn.hx:131]
   at com.stencyl.behavior::TimedTask/update()[C:/Program Files (x86)/Stencyl/plaf/haxe/lib/stencyl/1,00/com/stencyl/behavior/TimedTask.hx:48]
   at com.stencyl::Engine/update()[C:/Program Files (x86)/Stencyl/plaf/haxe/lib/stencyl/1,00/com/stencyl/Engine.hx:2373]
   at com.stencyl::Engine/postUpdate()[C:/Program Files (x86)/Stencyl/plaf/haxe/lib/stencyl/1,00/com/stencyl/Engine.hx:2618]
   at com.stencyl::Engine/onUpdate()[C:/Program Files (x86)/Stencyl/plaf/haxe/lib/stencyl/1,00/com/stencyl/Engine.hx:2611]
« Last Edit: July 22, 2017, 11:24:41 pm by imp2662 »


New attachment added by imp2662 - July 22, 2017, 11:22:59 pm


rob1221

  • Master Stencyler
  • *
July 23, 2017, 05:08:48 am
This is unlikely to be a Stencyl bug and should be posted in the forums instead.
  • Status changed from New to Closed


Pages: 1

Details

  • Reported
    July 22, 2017, 11:22:33 pm
  • Updated
    July 23, 2017, 05:08:48 am

  • View Status
    Public
  • Type
    Bug
  • Status
    Closed
  • Priority
    Normal
  • Version
    Stencyl 3.4
  • Fixed in
    (none)
  • Assigned to
    (none)
  • Category
    Compiling/Testing Games

Tags


Attachments


* random_spawn.png (25.38 kB, 605x658 - viewed 14 times.)