I am making a project where you type in a word and it brings you to a page based on the word. I am trying to make it so if the word is not a page, it does not go anywhere. I tried
<<if $command eq/is "page1" or "page2"...>><<goto $command>><<else>><<goto "Start">><<endif>>
that does not work, and I also tried
<<if $command eq/is ["page1", "page2",...]>><<goto $command>><<else>><<goto "Start>><<endif>>
which does not work either.
(note:I did not literally but /is, i just tried both commands)
If I am doing anything wrong, could somebody tell me?
If there is a better command, what is it?
Because (from memory) the <<goto>> macro is not part of the standard story formats I am going to assume you are using one of the SugarCube story formats.
The Logical operators section of the Twine 1 Reference contains a list of the operators supported by the standard story formats, two of those operators are: and and or
Those two operators can be used to evaluate multiple expressions at the same time, as demonstrated by the example directly following the operator list.
So your example should be: note: A similar list of operators can be found in SugarCube's <<if>> macro documentation, I did not use that list because the example following it does not show how to use the and or or operators.
(I thought I put sugarcube in the tags )