# It is illegal to fall out of a *choice statement

I was doing some coding for my game, but I keep running into an error mentioned above. Since I am coding several furnitures for the kitchen, it would be useful to clarify where the room 1 line 20 error is coming from.

``````
*temp room_1 true
*temp FridgeDoor false
*temp PantryDoor true
*temp StoveOven true
*set room_count +1
*label room_1
You travel to the kitchen and observe the food within the fridge as
it hums constantly. If you squint carefully, you can see the metal
hinges of the fridge squeak as the liquids slosh in their individual
*choice
*if (FridgeDoor = false)
#Go through the fridge door

You phase through the fridge door as cold air streams out in frosty
waves. You would be sensing the temparature of the fridge drop. You gaze
around to see if the fridge door is open and grab a carton of cold
milk. You start gulping the milk down as you hear a splash...
*finish
*elseif (FridgeDoor = true)

The door is already opened from the inside but you manage to see a
white puddle of milk from where you drank the whole carton. You smirk
*finish
#Check if the stove is on.
*if (StoveOven = true)
#The stove is not turned on!
You turn on the stove with a slow wave of your hand. A bright blue flame flickers upon the steel brazier.
*finish
*elseif (StoveOven = false)
#The stove is already turned off.
The stove is already turned off.
*finish

``````

The indentation isnâ€™t working, so itâ€™s difficult to tell. I think the problem lies in this part though:

``````#Check if the stove is on.
*if (StoveOven = true)
#The stove is not turned on!
You turn on the stove with a slow wave of your hand. A bright blue flame flickers upon the steel brazier.
*finish
*elseif (StoveOven = false)
#The stove is already turned off.
The stove is already turned off.
*finish
``````

There shouldnâ€™t be # in front of the last two things because theyâ€™re the result of a stat, not an option in a choice. And the elseif should be an else.

I removed the two # symbols and then it gave me a new error which says: Error: room_1 line 20: Expected option starting with #

The ones for â€śthe stove is not turned onâ€ť and â€śthe stove is already turned offâ€ť?

From what I can tell line 20 is the â€ścheck if the stove is onâ€ť option itselfâ€¦

Yes, Cecilia. I removed the # symbols from those two choices

Let me fiddle with your post to see if I can turn up the actual indentation, thenâ€¦

1 Like

Thatâ€™s more like it. It seems thatâ€™s not the problem after all. The thing before the final option needs to be an else instead of an elseif, and needs to be lined out with the if statement above it.

(and you might need to replace the if with an elseif)

1 Like

Thank you, that fixed the problem!

1 Like

Glad to help. And the â€śindent codeâ€ť option looks like a <./> (minus the .), for the next time you need assistance.