Leaving stats screen jumps to earlier point of story?

Hi everyone— new to ChoiceScript here and running into a weird problem with my stats screen. After clicking “Return to the Game” it will sometimes jump back much earlier in the chapter, even all the way to the beginning of the vignette. If I then play forward to that same point and do the same thing again, it will behave normally. Anyone have an idea what might be causing this?

That’s just an error that happens when your story isn’t in an app.

Are you editing your game while testing? If so, that’s the problem. If you save a new version of the file (even if you just correct the spelling or something), the game reloads the new version, from the start, when you return from the stat screen.

Otherwise I have no idea!

^As above, it throws the game state off if you edit the file during a playtest.
Anything that causes line numbers to change will likely cause problems.

Yeah, I had the same issue. (Although it isn’t so much an issue as a side-effect.) The wisest course is probably to reload the preview every time you change the code, just in case.