# Why does \*finish break my game?

**URL:** <https://forum.choiceofgames.com/t/why-does-finish-break-my-game/8995>\
**Category:** ChoiceScript Help\
**Created:** [April 25, 2015, 12:29am UTC](https://forum.choiceofgames.com/t/why-does-finish-break-my-game/8995 "2015-04-25T00:29:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sashira](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/sashira/32/2899_2.png) [@Sashira](https://forum.choiceofgames.com/u/Sashira)\
**Post date:** [April 25, 2015, 12:29am UTC](https://forum.choiceofgames.com/t/why-does-finish-break-my-game/8995/1 "2015-04-25T00:29:01Z")

</div>

I have all of my scenes listed sequentially in Startup. When I first started coding, \*finish worked fine. Now when I try to end a scene with \*finish it throws up errors for players, even if the game passes quicktest. There are a few scenes that go to multiple places, but those weren’t the ones that \*finish messes with.

I’ve had to change everything to \*goto\_scene commands, with whatever text I want added with a \*page\_break. Which works, but why would \*finish not send you to the next scene in the list? Does it only work if all of your scenes follow in a linear order, e.g. anything after branching off will no longer work correctly with a scene list?

---

<div class="post-metadata">

**Author:** ![Vendetta](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/vendetta/32/533_2.png) [@Vendetta](https://forum.choiceofgames.com/u/Vendetta)\
**Post date:** [April 25, 2015, 8:08am UTC](https://forum.choiceofgames.com/t/why-does-finish-break-my-game/8995/2 "2015-04-25T08:08:37Z")

</div>

Could you be more specific about what the error messages say? It’s definitely an odd one, as from what you’re describing there’s no obvious reason why \*finish should be failing to work properly unless there is indeed an actual bug along the lines suggested in your final sentence.

---

<div class="post-metadata">

**Author:** ![Nocturnal\_Stillness](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/nocturnal_stillness/32/100414_2.png) [@Nocturnal\_Stillness](https://forum.choiceofgames.com/u/Nocturnal_Stillness)\
**Post date:** [April 25, 2015, 8:54am UTC](https://forum.choiceofgames.com/t/why-does-finish-break-my-game/8995/3 "2015-04-25T08:54:42Z")

</div>

\*finish sends the game to whatever file is next in the scene\_list for example let’s say you have the following where players can either go left (pathone) or go right (pathtwo) and they should then go straight to chapter\_two. Then say the scene\_list looks like this…

startup  
chapter\_one  
pathone  
pathtwo  
chapter\_two

A \*finish in pathone would send the player to pathtwo. Because it is the next file in sequence.

So there is no logical reason it shouldn’t work. What kind of error do players get?

---

<div class="post-metadata">

**Author:** ![Sashira](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/sashira/32/2899_2.png) [@Sashira](https://forum.choiceofgames.com/u/Sashira)\
**Post date:** [April 26, 2015, 4:23am UTC](https://forum.choiceofgames.com/t/why-does-finish-break-my-game/8995/4 "2015-04-26T04:23:30Z")

</div>

I don’t have it documented, but it’s something along the lines of a “failure to find file” error, as if I had deleted that scene from the folder. But it’s always there in both the folder and the scene list.

Next time it happens, I’ll try to figure out more details.

---

<div class="post-metadata">

**Author:** ![Silverstone](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/silverstone/32/9901_2.png) [@Silverstone](https://forum.choiceofgames.com/u/Silverstone)\
**Post date:** [April 26, 2015, 5:22am UTC](https://forum.choiceofgames.com/t/why-does-finish-break-my-game/8995/5 "2015-04-26T05:22:23Z")

</div>

> [@Nocturnal\_Stillness](#):
>
> \*finish sends the game to whatever file is next in the scene\_list for example let’s say you have the following where players can either go left (pathone) or go right (pathtwo) and they should then go straight to chapter\_two. Then say the scene\_list looks like this…
> 
> startup chapter\_one pathone pathtwo chapter\_two
> 
> A \*finish in pathone would send the player to pathtwo. Because it is the next file in sequence.

@Sashira if it’s something like this just add a \*set variable\_path1 true

Then at the beginning of path 2 have an \*if statement to bypass to chapter 2. Eg.  
\*if (variable\_path1)  
\*finish

Does the error happen when you run the random test? Also in quicktest does it test all the lines. If you see a “some lines not tested” there’s a \*finish command somewhere in those untested lines. It’ll pass the quicktest but still give errors when playing through. (Happened to me 😫, I forgot to remove the finish place markers).

---

<div class="post-metadata">

**Author:** ![Sashira](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/sashira/32/2899_2.png) [@Sashira](https://forum.choiceofgames.com/u/Sashira)\
**Post date:** [April 28, 2015, 8:39pm UTC](https://forum.choiceofgames.com/t/why-does-finish-break-my-game/8995/6 "2015-04-28T20:39:53Z")

</div>

> [@Silverstone](#):
>
> Does the error happen when you run the random test? Also in quicktest does it test all the lines. If you see a “some lines not tested” there’s a \*finish command somewhere in those untested lines.

I only use finish at the end of a scene (if I need something else to finish early, I send it to a label on the second-to-last line.) So while that’s a good thing to keep in mind, that’s not the problem.

As for random test, I can’t get it to work right. I’m on a Mac and whenever I try to run it, it takes forever and refuses to “scroll to bottom”, so I have to take ten minutes to load and scroll the whole transcript of it every time I try to run it.

---

<div class="post-metadata">

**Author:** ![Silverstone](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/silverstone/32/9901_2.png) [@Silverstone](https://forum.choiceofgames.com/u/Silverstone)\
**Post date:** [April 28, 2015, 10:26pm UTC](https://forum.choiceofgames.com/t/why-does-finish-break-my-game/8995/7 "2015-04-28T22:26:17Z")

</div>

> [@Sashira](#):
>
> whenever I try to run it, it takes forever and refuses to “scroll to bottom”

I get this problem too on my phone. Takes forever and never goes to the bottom. Even if there is an error. I like to make the iterations “1000” instead. And start from a different seed on a second run through. Another thing I like to do if I use the 10000, is “find on screen”, mac should have that too. Type the number of the seed closest down the bottom to save you scrolling. That’s if there’s no errors. Or text if you know where the buggy line is.

So you don’t know which scenes bug out your startup sequence? I’m pretty sure hitting \*finish in a branched scene will take you to the next chapter in sequence, as it runs from top to bottom only. [Scene list | ChoiceScript Wiki | Fandom](http://choicescriptdev.wikia.com/wiki/Scene_list)
