How do I leave *If&*Else correctly?


One more wee snag. For some reason whenever I use an *if statement that I try to end in a *goto I get an error message **"It is illegal to fall out of a *choice statement; you must goto or finish before the end of the indented block." I can get them to work with *finish, so I’m super not sure what I’m doing wrong. Here’s a sample of how I’m writing the code:

#I want to poke a few holes in the so-called science behind oxytocin, so I'm working with experiments that show a disconnect between exposure and predicted results.
		*if (chutzpah > 59)
			You know what it looks like. Yes, you've got results and chemicals hung from the walls, connected in a web of yarn demonstrating all the false positives. Others might think you're crazy, but you know there's more to the world than what medicine has documented thus far; you're going to keep an open mind. Your worldview affirmed, you get ready to turn in for the night.
			*set cynthiarival true
			*set skepticism %-10
			*goto mib

		*elseif (chutzpah < 59)
			You step back after hours of probing the results of these scientific studies and can come to only one conclusion: Oxytocin definitely has dramatic effects on people, even if those effects are expressed in so many different ways. You admit with some disappointment to yourself that the world is all too mundane. Your worldview challenged, you turn in for the night.
			*set rileyrival true
			*set skepticism %+10
			*goto mib

Can anybody spot my mistake?


You have a gap in the code - if chutzpah is 59 exactly it doesn’t know what to do. It’s better to have

*if chutzpah>59
       etc etc
       *goto mib
       etc etc
       *goto mib


Also, *if / *elseif / *else sequences always have to end with *else as the final condition, or they will bring up an error. *else functions as the catch-all for situations where none of the previous conditions are met.


That has indeed done the job! Thank you both so much!