HTML5 problem...

Crovaxus17

  • Posts: 76
So I've been having a problem with running my game on html5 (I am not a subscriber, so I only have the html5 beta on 3.4). After only a couple of scenes into the game,  I get a blank black screen. When I run logs I get this sort of thing (many lines of it):

Level:     ERROR
When:      2018-10-12 19:36:12:068
From:      stencyl.sw.editors.snippet.designer.codebuilder.xml.XMLParser

Can't load definition: set-val-78-2

Level:     ERROR
When:      2018-10-12 19:36:12:068
From:      stencyl.sw.editors.snippet.designer.codebuilder.xml.XMLParser

Can't load definition: get-val-78-2

Level:     ERROR
When:      2018-10-12 19:36:12:059
From:      stencyl.sw.editors.snippet.designer.codebuilder.xml.XMLParser

Can't load definition: get-game-val-85

Level:     WARN
When:      2018-10-12 19:36:08:357
From:      stencyl.sw.util.Util

Could not parse "". Defaulting to: 0.0. stencyl.core.engine.snippet.IVariable.getRealValue (line: 251)

I am not sure if these errors are causing the problem since the game is not actually crashing or anything, but they are the only problem I can find. Any ideas what I am doing wrong?

merrak

  • *
  • Posts: 2265
Does the browser's debug console reveal any other error messages?

Crovaxus17

  • Posts: 76
Not that I can see. But it is a LOT of code, and I am not sure what I am looking for. There is nothing that is obviously marked "error"...

merrak

  • *
  • Posts: 2265
If you have a playable HTML5 version uploaded somewhere, I'll take a look at the browser debug console. Some of the errors you mentioned look like ones I remember seeing in 3.4 that can be ignored.

Crovaxus17

  • Posts: 76
Unfortunately, I cannot make a working html5 version. I also get an error when I try to make an executable in html5 :(

Crovaxus17

  • Posts: 76
So, after a bunch of testing and learning how to use the browser debug console better, I found some error messages. It turned out to be something to do with some of my behaviors setting an Actor variable in another actor's behavior. So actor instance A would set the actor variable for actor instance B's behavior to "self"––that is, actor A. (I attached an image of the code block to this message.) For some reason, even though this behavior worked perfectly on Flash and MacOS testing, html5 couldn't handle it. And since Flash and MacOS are currently broken for me, I would really like to shift my game to html5. Anyway, I figured out a fix, but I am not happy with it. Basically, the only actor this feature really matters for is the player, so I can set the actor variable I need with the "for each actor of group" block; since there is only ever one player actor in the scene, it works. But it feels clunky and inefficient to me. If anyone has any idea why this kind of behavior would work on Flash and OS but not html5, I'd like to know; or if there is some better way to make it work on html5.