[EMAIL PROTECTED] wrote:
> 
> I know that pick secret-words 1 is choosing "camel" and I am typing "camel"
> so I don't know why the first option of the either is not being chosen. Some
> guru please help!!
> 

Changing the part of the script after the REBOL header as follows would
seem to me to make more sense.  What's the point of 'secret-words being
a list if you only look at the first one (where "first" is hard coded)?
Instead, why not just check to see if the entered word appears in the
list?

    REBOL [] ; snipped for space

    secret-words: [ "camel" "llama" "oyster" ]

    name:  ask "What is your name? "

    either equal? name "Randal" [
        print "Hi Randal! No secret word required. You're the greatest!"
    ][
        print ["Hello" name "." ]

        guess: ask "What is a secret word? "

        either (find secret-words guess) [
            print "That's it!!!! You got it!!!"
        ][
            print "I'm sorry! That's not it."
        ]
    ]

OBTW, note the reformatting.  Consistent indentation helps the eye pick
out which code goes in which block much more easily.

-jn-

Reply via email to