• 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!

HTML5 Problem with first click in HTML5 games

M

MarianoMaff

Guest
Hello friends, when I convert my games made for Android to HTML5 almost everything works fine, you always have to make some adjustments but there is something I do not know how to solve and it is driving me crazy, the first click of the mouse does not work or the first released, it throws a error:

Uncaught TypeError: Can not read property 'length' of undefined

I need to deliver a game today, I can pay someone to help me solve this problem, please reply to this message and if you want to send me something for private it is a [email protected]
Thank you very very much!
 

Attachments

FrostyCat

Redemption Seeker
Try running under debug mode first. This should hint you at the exact line in GML where the error comes from.
 
M

MarianoMaff

Guest
Hi FrostyCat, first of all thank you for helping me. In debug mode the only error that I get is the ini file, everything says 100% but in the ini file it says 0%, can that be the problem?
 

FrostyCat

Redemption Seeker
That could very well be it. The HTML5 export needs INI files to be included files before you can use it with ini_*() functions.
 
M

MarianoMaff

Guest
I have tried everything, I guess it will be a Game Maker error and we will have to get used to having people double click to play the game, the error is always the same, if someone with more experience has some other possible solution to taste it I will do. The console, making that invalid click says:
"Uncaught TypeError: Can not read property" length "of undefinded"
 
D

dannyjenn

Guest
Maybe it's just slow loading the ini file, and the error is a result of it trying to read from the file before it's loaded?
Maybe you could make it so that the game waits a second or two before allowing for the first click. Not sure whether that would work, but it's worth a try. Definitely not the best solution though.
 
M

MarianoMaff

Guest
Thanks for answering, I also thought it could be a matter of time but not, if you click at the beginning or after half an hour the first one will always be invalid
 
Top