"Passage header in Twine: Help needed!

Hello! I’m somewhat new to Twine, and I help making a passage header. I already made a tag and passage named header and I added this code.

{
(save-game: $money)
(save-game: $name)
(save-game: $day)
(save-game: $Journal)
(save-game: $strike)
(save-game: $JOB)
(save-game: $Gender)
(save-game: $childnumber)
(save-game: $child_gender)
(Save-game: "Slot A")
}

so i am trying to make the game auto save without having to place the code in every passage but it’s not working and how do i make it load?

Any guidance would be appreciated!

Hi!
I’m not very familiar with Harlowe, but looking at the documentation (Harlowe 3.3.8 manual), you do not have to type out every variable you want saved - the save macro records your complete game state, all story variables included. So the correct code to put in the “header”-tagged passage would be something like (save-game:"Slot A", "Test")

You can then put a link to load the game from the save slot wherever you want, like on the opening screen (the load-game is also described in the docs I linked): (link: "Load")[(Load-game:"Slot A")]

However, since putting the code in the header passage means the game is saved in every passage, this will cause an issue where loading from the opening screen just reloads said opening screen. To avoid that, you can create a tag for passages where you don’t want to save and wrap the code in the header in it:

(unless: (passage:)'s tags contains "menu")[(save-game:"Slot A", "Test")] (the game won’t save in “menu”-tagged passages).

Thanks one question how do i reset the saves

Looking it up, it seems Harlowe doesn’t offer any function to delete existing saves: https://www.reddit.com/r/twinegames/comments/158ftbj/how_to_copy_rename_delete_saves/

You can only overwrite the saves. I found some info on using JavaScript to delete saves, but it was for 2.1 version of Harlowe.