errors with script? sugarcube 2

+1 vote
asked Aug 11 by AnoeticDuckling (1,920 points)
edited Aug 11 by AnoeticDuckling

So this is my code, but I keep getting errors about it. It used to work and then suddenly it didn't work. 

<<switch visited()>>
<<case 1>>
words words words
[[option 1]] || [[option 2]]
<<case 2>>
words words words
[[option 1]] || [[option 2]]
<<case 3>>
words words words
[[option 1]] || [[option 2]]
<<case 4>>
words words words
[[option 1]] || [[option 2]]
<</switch>

The errors I get are things like "can't find <</switch>>" but prints it out on the last line and "<<case>> can't find it's parent macro>>

It's also only the first passage that doesn't work, the other two where I have this exact code work just fine.

1 Answer

0 votes
answered Aug 11 by Chapel (17,920 points)
 
Best answer
You're missing a '>' at the very end.
commented Aug 11 by AnoeticDuckling (1,920 points)
it's always the stupid things that trip me up, sorry, my bad. I feel like an idiot.
commented Aug 11 by Chapel (17,920 points)
It happens to the best of us.
Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.
...