Stats increase/decrease every time I look at stats page

I’m having trouble with my stats. So I’m using the standard *set stat + 5, but every time I click on ‘show stats’ and then go back to the page, it’s adding another 5.

My code looks like this:

*choice
```#blahblahblah
``````*set stat + 5
``````Blahblahblah text stuff

It also does this for taking away stats as well.

Maybe I’m missing something super obvious here, but I’m not sure what.

Thanks for the help!

Edit: looking again this might only be happening in CSIDE?

:thinking: This shouldn’t be happening unless you’re using randomization.

Just for precaution, move all your *set statements (and other commands, like *rand) to the top of the code block, then add a *page_break after them. Encapsulating your code like this should prevent the cs engine running over it multiple times.

Edit:
The CS Engine ignores consecutive page breaks if there’s no text printed to the screen. That is, don’t worry that it’s going to add a weird “next” button in an empty page between the choice and the choice text, cus it won’t.

Oh, thank you very much!!

I’m not using random, and as I say, so far it only seems to be happening in CSIde and I can’t get the problem to replicate in actual playtests, but your solution seems very elegant and I’m going to try it anyway.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.