Why does *finish break my game?

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?

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.

*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?

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.

@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 :tired_face:, I forgot to remove the finish place markers).

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.

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