haroldo-ok/twee2sam

Problem with conditional menu items

Opened this issue · 0 comments

As reported by "Zero X. Diamond, there are some instances where links placed inside <<if>>s aren't working as they should.

Original quote:

So I'm working on yet another thing for some reason or another, and I've started using variables. I thought I understood how they worked, but apparently I don't as I'm having a weird issue.
So here's how I initially did it:

<<if BeenInKitchen is 0>> 
* [[GRAB A SNACK|Kitchen]] 
<<endif>> 
<<if ListenedToRecord is 0>> 
* [[LISTEN TO SOME TUNES|RecordPlayer]] 
<<endif>> 
<<if CheckedComputer is 0>> 
* [[CHECK JOEL'S COMPUTER|Computer]] 
<<endif>> 
* [[LEAVE APARTMENT|LeaveApartment]]

With this code, I was only ever getting GRAB A SNACK omitted from the options, even if I restarted and chose LISTEN TO SOME TUNES instead. I thought maybe I'd set the variables wrong or something, but using some <> calls, I found that they are in fact being set properly. Apparently resetting in Fusion wasn't actually totally resetting as the variables remained set somehow. Despite this, if I did LISTEN TO SOME TUNES and only that variable was set, then went to the Kitchen passage, it would show that both variables were now 1 but still only the first one I picked would be omitted.