YoYoGames / GMEXT-Firebase

Repository for GameMaker's Firebase Extension
Other
8 stars 6 forks source link

html5 setup #30

Closed cpt-jebediah closed 1 month ago

cpt-jebediah commented 1 month ago

I'm trying to setup a leaderboard for a html5 browsergame using a firebase cloud firestore database. I followed this tutorial on the GameMaker Youtube channel that uses the Firebase Firestore extension https://www.youtube.com/watch?v=6RBN9rB52lI . Though this tutorial ommited to explain how to provide the database ID to GameMaker, I could do it by simply following the documentation PDF provided with the extension. It worked as expected for the Windows export as in the tutorial. The tutorial doesn't adress the case of html5 export, so I relied once again on the documentation of the extension. As required, I modified the index.html document by copy/pasting my Firebase configuration and included it in the export. However, despite following every step of the documentation, I could not make the html5 export work as the debugger gives me the following error : Unhandled Exception - Uncaught SyntaxError: "undefined" is not valid JSON in file http://xxxxxxxxxxxxx/index.html at line 1

All I do in my code is set a listener in a create event :

root = "Scores";
listener = FirebaseFirestore(root).Listener();

And that is enough to crash the game with the given error. Documentation file provided with the extension is outdated (e.g. the database URL is not necessary anymore for web application setup), and the GitHub wiki page is incomplete for Web Setup. I am doing something wrong or does the current version of the extension not support html5 export ?

DiasFranciscoA commented 1 month ago

Fixed in the new update. The documentation was incorrect you should follow the new setup documentation. Updates will reach the marketplace soon