Restart and Reset

Please specify version and format if asking for help, or apply optional tags above:
Twine Version: 2.3.13
Story Format: Harlow 3.2.1

Hi everyone,
I’m at the end of my story and I would like to give the reader a link to restart and reset. I’ve found the restart command and I’ve tried placing this in the last passage of my story,

(link: "A game about life")[(restart:)]

But then I get this error

I mustn’t (restart:) the story in the starting passage.
I almost ended up doing the same thing over and over, forever.

(That’s cute.)
Any suggestions?
I do have a passage called variables with a startup tag that sets all the variables used throughout the game, if that makes anything easier. I thought that the startup tag would reset the variables at the first passage, but that does not seem to be the case. The variables from one story carry through to the next. Here is my variables passage if this helps.

{
	(set: $name to "name")
	(set: $shower to false)
	(set: $teeth to false)
	(set: $clothes to "nope")
	(set: $late to false)
	(set: $latelate to false)
	(set: $breakfast to false)
	(set: $traintime to true)
	(set: num-type $snooze = 0)
	(set: num-type $ready = 0)
}

And the last passage of your story isn’t also the starting passage (the one with the little white/green rocket-ship icon)?

The syntax of that code looks fine.

I created a test project with the following Passages and the A game about life link worked correctly when I selected it.
(warning: following code example was written using TWEE Notation.)

:: Startup [startup]
(set: $name to "name")
(set: $shower to false)
(set: $teeth to false)
(set: $clothes to "nope")
(set: $late to false)
(set: $latelate to false)
(set: $breakfast to false)
(set: $traintime to true)
(set: num-type $snooze = 0)
(set: num-type $ready = 0)

:: Start
The start of the project
[[Second]]

:: Second
The second passage of the project
[[Final]]

:: Final
The final passage of the project
(link: "A game about life")[(restart:)]

notes:
a. Harlowe doesn’t include a ‘reset’ macro, you will need to explain what you expect such a feature to do.
b. If you are using the Collapsing whitespace markup in your project’s startup tagged Passage to supress the line-breaks it generates from appearing at the top of your initial Passage then there is a better way to do that.
Adding CSS like the following to your project’s Story Stylesheet area will suppress all visual output generated by the startup tagged Passage.

tw-include[type="startup"] {
	display: none;
}

The code for the whitespace was excellent! Thanks.

Got it. I was trying to link directly back to the first passage. I didn’t realize that (restart:) actually does that for you. It’s working perfectly now. Thank you!