# Going to stats screen or settings and back advances past choice?

**URL:** <https://forum.choiceofgames.com/t/going-to-stats-screen-or-settings-and-back-advances-past-choice/40909>\
**Category:** Game Development\
**Created:** [July 11, 2018, 1:36pm UTC](https://forum.choiceofgames.com/t/going-to-stats-screen-or-settings-and-back-advances-past-choice/40909 "2018-07-11T13:36:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![CypherK](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@CypherK](https://forum.choiceofgames.com/u/CypherK)\
**Post date:** [July 11, 2018, 1:36pm UTC](https://forum.choiceofgames.com/t/going-to-stats-screen-or-settings-and-back-advances-past-choice/40909/1 "2018-07-11T13:36:00Z")

</div>

Let’s say I have a simple choice:

**startup.txt**

```
*comment just a quick test project

*title Choice Script Test
*author Anonymous

*scene_list
  startup
  test

*goto_scene test
```

**choicescript\_stats.txt**

```
This is a stats screen!
```

**test.txt**

```
Hello World

*choice
	#do nothing
		you did nothing
		*goto done
	#do something
		you did something
		*goto done

*label done
```

Now if I press “Show Stats” or “Settings” and then “Return To Game” before I make a choice, it should return to the choice and let me pick an option.

And it does … the first time you play.

Let’s say I did that once and now press “Play Again”.  
I’m now at the choice screen again.

_But_ if I press “Show Stats” or “Settings” and then “Return To Game” _this_ time, it will advance past the choice, as if I had picked the same option I did the last time I played.  
I.e. if I selected “#do nothing” in the first round, I will now be reading “you did nothing” and the game ends.  
If I selected “#do something”, I will read “you did something” and the game ends.

This looks like a bug to me. Anybody able to reproduce this?

---

<div class="post-metadata">

**Author:** ![MeltingPenguins](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/meltingpenguins/32/255855_2.png) [@MeltingPenguins](https://forum.choiceofgames.com/u/MeltingPenguins)\
**Post date:** [July 11, 2018, 1:37pm UTC](https://forum.choiceofgames.com/t/going-to-stats-screen-or-settings-and-back-advances-past-choice/40909/2 "2018-07-11T13:37:40Z")

</div>

Ar you testing this on firefox/safari or dashingdon?

---

<div class="post-metadata">

**Author:** ![CypherK](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@CypherK](https://forum.choiceofgames.com/u/CypherK)\
**Post date:** [July 11, 2018, 2:16pm UTC](https://forum.choiceofgames.com/t/going-to-stats-screen-or-settings-and-back-advances-past-choice/40909/3 "2018-07-11T14:16:47Z")

</div>

Firefox

(also seems to happen on IExplorer, but who on earth uses that?)

Chrome won’t let me test it.

---

<div class="post-metadata">

**Author:** ![MeltingPenguins](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/meltingpenguins/32/255855_2.png) [@MeltingPenguins](https://forum.choiceofgames.com/u/MeltingPenguins)\
**Post date:** [July 11, 2018, 2:41pm UTC](https://forum.choiceofgames.com/t/going-to-stats-screen-or-settings-and-back-advances-past-choice/40909/4 "2018-07-11T14:41:10Z")

</div>

You can’t test on chrome due to some java stuff IIRC.

Try clearing the cache for each test (yeah, it’s annoying) and see if it stays?

---

<div class="post-metadata">

**Author:** ![CypherK](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@CypherK](https://forum.choiceofgames.com/u/CypherK)\
**Post date:** [July 11, 2018, 2:46pm UTC](https://forum.choiceofgames.com/t/going-to-stats-screen-or-settings-and-back-advances-past-choice/40909/5 "2018-07-11T14:46:45Z")

</div>

Clearing the cache seems to have no effect.

On a side note, this error does not seem to occur when I manually restart the scene, i.e.

```
Hello World

*choice
	#do nothing
		you did nothing
		*goto done
	#do something
		you did something
		*goto done

*label done

*page_break Restart

*goto_scene test
```

So it seems to be somehow tied to the game’s ending.

---

<div class="post-metadata">

**Author:** ![Szaal](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/szaal/32/112202_2.png) [@Szaal](https://forum.choiceofgames.com/u/Szaal)\
**Post date:** [July 11, 2018, 5:36pm UTC](https://forum.choiceofgames.com/t/going-to-stats-screen-or-settings-and-back-advances-past-choice/40909/6 "2018-07-11T17:36:43Z")

</div>

I’ll let @dfabulich know about this.  
Hopefully, if it’s indeed a bug, it’ll be documented and fixed on future versions.

---

<div class="post-metadata">

**Author:** ![dfabulich](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/dfabulich/32/198373_2.png) [@dfabulich](https://forum.choiceofgames.com/u/dfabulich)\
**Post date:** [July 11, 2018, 7:57pm UTC](https://forum.choiceofgames.com/t/going-to-stats-screen-or-settings-and-back-advances-past-choice/40909/7 "2018-07-11T19:57:42Z")

</div>

Yup, it was a bug. (Visiting the stats screen after restarting the game was undoing the restart.) It’s fixed now in the latest ChoiceScript on github.

---

<div class="post-metadata">

**Author:** ![Szaal](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/szaal/32/112202_2.png) [@Szaal](https://forum.choiceofgames.com/u/Szaal)\
**Post date:** [July 12, 2018, 3:01am UTC](https://forum.choiceofgames.com/t/going-to-stats-screen-or-settings-and-back-advances-past-choice/40909/8 "2018-07-12T03:01:50Z")

</div>

And here I am, thinking that you’re busy with the omnibus v2.0 🧐
