Hello,
I'm trying to make a puzzle, the solution of which is a birthdate. Because of different date conventions, I want to allow for February 14 1990 to be entered into the text macro as "140290" and "021490" and have both be correct.
The problem I have is that my code currently allows any string to be correct.
The text macro is
The middle container is sealed with a single combination lock. There are six numbers.
<<textinput $container3code
container3open>>
and in the passage "container3open" the code is
<<if $container3code is "021209" or "120209">>You opened container 3!
<<else>>
That doesn't seem to be the right code.
Try again?
<<textinput $container3code
container3open>><<endif>>
containers
If I enter "12345" it simply accepts it and prints "You opened container 3!"
Am I approaching this wrongly? What is a better way to allow multiple correct answers whilst filtering out incorrect ones?
Comments
Copy your code here so that people can take a look.
means exactly as it is. Either $container3code is "021209", or "120209" is a string. "120209" is always a string, no doubt, so you always get TRUE as an answer.