AidanPTD 0 Report post Posted March 22, 2018 Hi, In currently trying to host a Phaser game with GitHub Pages, but it's not showing up. I've looked at the code for this game, and it all seems fine, as well as the index.html for the page. I'd like a fresh pair of eyes, so would anyone mind taking a look at the source code? Thanks to everyone in advance! Git Hub Repository: https://github.com/AidanPTD/Games Git Hub Pages: https://aidanptd.github.io/Games/ Quote Share this post Link to post Share on other sites
samme 719 Report post Posted March 23, 2018 Quote SyntaxError: Unexpected token '{'. import call expects exactly one argument. main.js:6 Quote Share this post Link to post Share on other sites
AidanPTD 0 Report post Posted March 23, 2018 @samme, I tried removing line 6, but now the camera doesn't move as expected. How would I change this line to work properly? import {Math} from "phaser-ce"; Quote Share this post Link to post Share on other sites
samme 719 Report post Posted March 23, 2018 I don't see where else Math is used, but you can use Phaser.Math instead (no import). Are you writing TypeScript? It looks sort of like TypeScript but it doesn't seem to be compiled to JS. Quote Share this post Link to post Share on other sites
AidanPTD 0 Report post Posted March 23, 2018 I'm actually trying to modify the code from this tutorial and add some things to it. But I'll try your suggestion. Quote Share this post Link to post Share on other sites
AidanPTD 0 Report post Posted March 23, 2018 @samme, your suggestion didn't work, unfortunately. I'm still unsure of what to do... I'm getting "phaser-ce" from the file "phaser.d.ts" in a different folder, which I linked the "main.js" file to successfully. I'm also not sure if the example that I'm following is based on JavaScript or TypeScript, but it seems like it's using JavaScript (it says so in the tutorial..). Should I try converting my file to typescript and try from there, or do you have any other ideas? Quote Share this post Link to post Share on other sites