• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

HTML5 HTML5 Games draw variables has "undefined"?

P

paca

Guest
I posted a similar thread a while ago, but no one responded and this is very urgent.

I'm making a game and I would like to make an HTML5 version available online, but some drawn variables are being drawn has "undefined" instead of the number I want to draw. In the windows version, it works the way I would like it to but on HTML it doesn't work, any ideas on what I can do to fix it? I think it may have something to do with the create event but besides that I have no idea why this isn't working.

I attached two photos, one is the windows version of the game and another is the HTML5 version. I also noticed that a line sprite that I drew over the screen does not appear.

Please respond with any information you can provide, I made this little game for a school project and I need this to work. Thank you.

gm1.JPG gm2.JPG
 

FrostyCat

Redemption Seeker
Either the drawing code is crashing your game, or the variable assignments aren't done properly.

Since there might be an engine-level issue with this problem, I suggest that you share the entire project.
 

FrostyCat

Redemption Seeker
Your problem is related to this bug report: #0023788

Instead of using alarm_set(), just set the alarm array directly like this.
Code:
alarm[0] = 90;
After I replaced all of your alarm_set() calls, your game works just fine.
 
Top