errors with script? sugarcube 2

+1 vote
asked Aug 11 by AnoeticDuckling (1,930 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 (27,390 points)
 
Best answer
You're missing a '>' at the very end.
commented Aug 11 by AnoeticDuckling (1,930 points)
it's always the stupid things that trip me up, sorry, my bad. I feel like an idiot.
commented Aug 11 by Chapel (27,390 points)
It happens to the best of us.
...