Stencyl 3.4.0 is now out. Get it now!

Flash Error #1009

DragonSoul150

  • Posts: 6
Hi, I've run into an error that I've had for a while on this game. It's my first game too so I'm not very experienced with dealing with bugs.

The error seems to only happen on the first "boss level" of my game that I've created so far, which consists of the boss running at the player and killing other enemies in its path by hitting them (to let the player know of the danger). It's mostly crash course assets so the enemy is a large version of the clown that is intended to kill actors (player and enemy) on impact while the small enemies cause no damage.

The error isn't always a big deal, often times there's just a window saying an error happened and I have the option to continue or cancel everything. The problem is when sometimes the game would reload with the stage having disappeared and centered on the enemy with no controls working (screenshot included). I believe the error happens because the boss is set to kill enemies but sometimes doesn't kill every enemy on the screen, will attach error logs and screenshots below. I have a temporary fix that I made when I first encountered the error which was by adding a button to reload the scene, but that's a clunky way to fix a game.

Supplementary info:

1. I'm running Mac OSX 12.4 (Sierra)
2. In Stencyl 3.4.0

Thanks for the help!

« Last Edit: April 12, 2017, 03:32:22 am by DragonSoul150 »

KramerGames

  • *
  • Posts: 372
1009 means that you are referencing an attribute that has no value. The errorcode says it is in line 127 of "sceneevents_2". If you made this as a scene behavior you can go into the design mode and clock "preview code" at the top, this will show the code including lines so you can just see which block exactly is the problem.

My guess is the first block. Try dragging down the "2nd actor" button into the very first block "Kill noni 1" so that is says "kill actor 2".
Parasites United  (Idle Parasite Game)

DragonSoul150

  • Posts: 6
Thank you very much! I'll try that and reply as soon as I notice any differences.

yoplalala

  • *
  • Posts: 1369
How many times does "kill noni" print ?
If it prints multiple time, you should if noni is alive around those blocks.

DragonSoul150

  • Posts: 6
I tried to do what @KramerGames said by changing the first block. That didn't work. Then I had the idea that perhaps it's because it's still trying to kill "Noni"/go after him even when he's no longer on the screen. So I added "If" blocks. Sadly that didn't work either. I included "Otherwise If" blocks to updating the movement of "Clown Boss" and even when Clown Boss hits Noni. But, as you guessed, that didn't work either.

I decided to try diagnostics, turning off certain blocks in the event to see how it works when they're off, and it's odd. It seems that the updating movement of clown boss is the problem. However I did run into a bug (without a pop-up) with what I think was from the kill Noni blocks. I think the problem may be with trying to say "If Noni is dead", however because I'm not experienced with this, I just said "If Noni is alive = False." I've also tried using the "Stop" Block under the "If" and "Otherwise if" blocks, but that didn't seem to work either (occasionally it caused even more errors).

@ yoplalala "Kill Noni" prints only once before the error, however I noticed that it's also after multiple "update clown boss" logs show up (because he's gradually moving closer). So I think the problem actually lies with the Clown Boss trying to move towards something that is no longer there, but I can't be certain.

Thank you both for trying to help before, but I'm asking for help again.

yoplalala

  • *
  • Posts: 1369
the corrections you made would have corrected the error in your first post. Here, what's the problem ? Still the same one ? I'm not seeing the error anymore

stencyl.sw.app.filewatcher.ExternalAppLauncher: [Flash] com.stencyl.Engine#switchScene(1732): Switching to scene 2
2017-04-13 17:35:23,341 INFO  [pool-1-thread-4] stencyl.sw.app.filewatcher.ExternalAppLauncher: [Flash] scripts.SceneEvents_2#init(96): Kill Noni
2017-04-13 17:35:29,385 INFO  [pool-1-thread-4] stencyl.sw.app.filewatcher.ExternalAppLauncher: [Flash] com.stencyl.Engine#switchScene(1732): Switching to scene 2
2017-04-13 17:35:29,385 INFO  [pool-1-thread-4] stencyl.sw.app.filewatcher.ExternalAppLauncher: [Flash] scripts.SceneEvents_2#init(96): Kill Noni
2017-04-13 17:35:34,917 INFO  [pool-1-thread-4] stencyl.sw.app.filewatcher.ExternalAppLauncher: [Flash] scripts.SceneEvents_2#init(107): Kill Enemy
2017-04-13 17:35:34,917 INFO  [pool-1-thread-4] stencyl.sw.app.filewatcher.ExternalAppLauncher: [Flash] com.stencyl.Engine#switchScene(1732): Switching to scene 2
2017-04-13 17:35:34,917 INFO  [pool-1-thread-4] stencyl.sw.app.filewatcher.ExternalAppLauncher: [Flash] scripts.SceneEvents_2#init(96): Kill Noni
2017-04-13 17:35:40,454 INFO  [pool-1-thread-4] stencyl.sw.app.filewatcher.ExternalAppLauncher: [Flash] com.stencyl.Engine#switchScene(1732): Switching to scene 2
2017-04-13 17:35:40,455 INFO  [pool-1-thread-4] stencyl.sw.app.filewatcher.ExternalAppLauncher: [Flash] scripts.SceneEvents_2#init(96): Kill Noni
2017-04-13 17:35:45,987 INFO  [pool-1-thread-4] stencyl.sw.app.filewatcher.ExternalAppLauncher: [Flash] com.stencyl.Engine#switchScene(1732): Switching to scene 2
2017-04-13 17:35:45,987 INFO  [pool-1-thread-4] stencyl.sw.app.filewatcher.ExternalAppLauncher: [Flash] scripts.SceneEvents_2#init(96): Kill Noni
2017-04-13 17:35:52,030 INFO  [pool-1-thread-4] stencyl.sw.app.filewatcher.ExternalAppLauncher: [Flash] com.stencyl.Engine#switchScene(1732): Switching to scene 2
2017-04-13 17:35:52,030 INFO  [pool-1-thread-4] stencyl.sw.app.filewatcher.ExternalAppLauncher: [Flash] scripts.SceneEvents_2#init(96): Kill Noni
2017-04-13 17:35:56,054 INFO  [pool-1-thread-4] stencyl.sw.app.filewatcher.ExternalAppLauncher: [Flash] com.stencyl.Engine#switchScene(1732): Switching to scene 2
2017-04-13 17:36:03,599 INFO  [pool-1-thread-4] stencyl.sw.app.filewatcher.ExternalAppLauncher: [Flash] scripts.SceneEvents_2#init(107): Kill Enemy
2017-04-13 17:36:03,600 INFO  [pool-1-thread-4] stencyl.sw.app.filewatcher.ExternalAppLauncher: [Flash] com.stencyl.Engine#switchScene(1732): Switching to scene

DragonSoul150

  • Posts: 6
Sorry for the late reply, traveling. That's odd, maybe the logs I included weren't from the same time I encountered the errors? I tried testing it and got the errors again so I'm not sure.