Issue with squiffy.story.go not working #100
-
I've been working on a project and I run into an issue. What I want to do is when the player chooses a New Game from the Menu, the game first cleans up all the data regarding the game progress to allow the fresh start and then sends the player into the Tutorial, from where the player actually starts the game. However, I can't get the automatic link to work, and I'm not sure what I'm doing wrong. The code is still a draft as I just began putting the text into the game, so a lot of things are still hidden in comments to be done later on. Just a heads up: I know little to nothing about JavaScript and HTML and I'm learning on the go, so my lack of knowledge might be the issue here. Here's how the important pieces of my code look like: @start Menu [[]]: [[Menu]]: [[New Game]]: [[Tutorial]]: I cut the parts that aren't involved out of the above (I edited the comments because they were invisible here to have additional space). When I run the preview (or the build), the function shows up printed like a text rather than work automatically. What I tried:
Nothing works. Any ideas why or what I'm doing wrong here? The reason I want the player to be able to start a new game without restarting is because the game is supposed to have many endings and I wanted to allow the player to check which ones they got. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hello, Any JS must be indented with 4 spaces. Also, your HTML comments are not formatted properly. The extra spaces Try it like this:
Note: I'm not giving you a hard time, I promise, but.... You might already have spacing in your code, but we can't see because it was posted like plain text. To post code blocks here: https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#quoting-code |
Beta Was this translation helpful? Give feedback.
Hello,
Any JS must be indented with 4 spaces.
Also, your HTML comments are not formatted properly. The extra spaces
<! --
are no good. Should be like<!-- NOTE HERE -->
Try it like this:
Note: I'm not giving you a hard time, I promise, but.... You might already have spacing in your code, but we can't see because it was posted like plain text. To post code blocks here: https://…