Disclaimer: I don't really know how the "programming" side of Twine works, but so far I've been able to correct everything that's gone wrong and troubleshoot it using fixes provided in this forum.
The game I'm making has variables (erosion, pesticide, fire, and fog), and once any of them reach a certain level, you die and go to the End passage.
However, I've noticed that once the last passage ("end") is reached, it keeps hitting it over and over again (the turns go up rapidly without end, but all the variables are the same). It makes it impossible to read the text.
If I test it by putting the max value into my startup passage (for example $erosion is 100), and then test directly from the End passage, it works. But if I play through normally it doesn't. I thought it was a problem with my header having a loop, but when I try to eliminate the header by only running it if it's true, and making it false in End, it still doesn't work. (I also have the no-header tag, but from what I can gather the header still runs with the no-header tag, it's just not visible?)
This is my header:
(if: $header is true)[(if: $erosion >=100)[(go-to: "end")]
(else-if: $fog <=0)[(go-to: "end")]
(else-if: $pesticide >=100)[(go-to: "end")]
(else-if: $fire>=89 and <99)[(if:(random: 1, 100) <=50)[(go-to: "Fire.")]]
(else-if: $fire >=100)[(go-to: "Fire.")]
(else:)[(if: $sitka is true)[(set:$fog to $fog-10)The salty air stings your bark.]
(if: $weed is true)[(set:$erosion to $erosion+10)(set:$pesticide to $pesticide+10)The covert growing operation continues to impact you.]
(if: $homes is true)[(set:$erosion to $erosion+10)The building project grows.]
---
(display:'stats') (set: $fog to $fog-10)(set: $fire to $fire+10){
(print: "<script>$('html').removeClass(\)</script>")
(if: (passage:)'s tags's length > 0)[
(print: "<script>$('html').addClass('" + (passage:)'s tags.join(' ') + "'\)</script>")
]
}]]
(else:)[not]
and this is my last passage:
(set: $header to false)
you died of (if: $pesticide >=100)[pesticides.](else-if:$erosion >=100)[erosion.](else-if:$fog <=0)[dehydration](else-if:$fires)[fire]
Is there something wrong with these? I'm using the default Harlowe 2.1.0.