What does "Illegal to fall out of a choice statement" mean?

Yeah I’m lost lol

1 Like

For every choice in a *choice statement, it must end with a *goto or *finish statement. For example:

*choice
	# option 1
		passage
		*goto exit

	# option 2
		passage
		*goto exit

	# option 3
		passage
		*goto exit

*label exit

Though you can use *fake_choice to bypass *goto in choices, or create a variable called implicit_control_flow in your startup.txt then set it to true.

For *fake_choice:

*fake_choice
	# option 1
		passage

	# option 2
		passage

	# option 3
		passage

And as for implicit control flow in your startup.txt:

*create implicit_control_flow true

*choice
	# option 1
		passage

	# option 2
		passage

	# option 3
		passage

Now you can use *choice without the usage of *goto. Good luck on your journey!

4 Likes

Before you turn on implicit control flow, it’s worth considering the kind of bugs that become harder to catch with ICF:

If you struggle to understand the risk that Dan’s talking about here, you might be better off using one of the first two methods rather than ICF.

4 Likes

I appreciate you both! I’ll definitely give the *goto method a try and hope that works. I also republished my story to be more dynamic. Once it’s a clean playthrough I’ll post the link so you all can try it out. Keep an eye out for “The Twelve” by Jay Johnson :folded_hands:t6:

3 Likes

FYI the “risk” of implicit control flow is immensely, immensely overstated. It’s a non-issue. Just slap implicit control flow at the top and forget about it. It should be the default.

And for my part, I reckon the inconvenience of Dan’s good old *goto method is immensely overstated – at least, for anyone who knows the keyboard shortcuts for cut and paste. For first-time-coder authors and their commenters/ editors, the safety net of explicit flow can justify its cost.

2 Likes