Falling out of choice error

I’m having trouble with this error:
Error: leftpath line 21: It is illegal to fall out of a *choice statement; you must *goto or *finish before the end of the indented block.

I keep checking but I can’t see anything wrong, although there obviously is
The game works, it is just failing quicktest

	#Pick them up
		You bring the HMS Rustbucket over to the bank and the adventurer boards. He grins broadly, takes off his hat and holds it under one arm whilst reaching out with the other for introductory handshakes and profuse thanks.
		“Sydney Lapsley at your service. Can’t thank you enough for the rescue. Fine ship you have here!”
		He continues to chat effusively with Sir Malcolm and Lady Jane but before you can join in you notice an object ahead in the river. It is a barrel with the word Explosive stencilled in white on the side.	
		*label barrelsydney
			*if (gun = true) #Use gun
				*if (bullets_number > 0) 
					*goto set_bullet_damagesydney
				*if (bullets_number = 0)
					*goto clicksydney
			#Ram barrel
				*goto ram
			#Go around barrel
				You take the HMS Rustbucket around the barrel, giving it as wide a berth as possible. As you come closer to the edge of the river you hear shouting from the bank. People are clambering aboard! They are dressed colorfully but their clothes are shabby and dirty. Tricorn hats emblazoned with a skull and crossbones adorn their heads. Four pirates have boarded! They wave their cutlasses menacingly and advance towards you. 
				Sydney rushes at them immediately and fights like a one man army. You are caught up in the melee immediately.
				You must fight the [b]Pirates[/b]
				[b]Skill 8 Stamina 10[/b]
				*label pirate_fightsydney
						*goto pirate_fight2
					*if (instant_win = true) #Insta Win
						*goto winsydney
					*if (knuckle = true) #Use Knuckle-Duster
						"It feels special every time"
						*goto pirate_fightk2
	#Ignore them

Thanks for another set of eyes on this!

Put *if and #choice-option on their own line. ie

*if (gun = true)
   #Use gun
1 Like

Many thanks, I tried that and no joy
I have been using that code a lot and it has passed quicktest/worked in all the other chapters


Hmm. I remember that QuickTest love to do all permutation so, in this case, both *if evaluates as false, giving you “fall out of choice” error.

Use *else instead, even though [bullets_number] is impossible to reach negative anyway.

1 Like

Cheers, I tried that and still not happy

Should I post the whole scene? It’s a lot of lines?

That’d probably the best.


You fixed it!
I needed to use else , as you said!

Thanks so much, now I am freeeeee!

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