Hi Casey,

The following line:

while (guess <=number or >= number)

is incorrect. I mentioned this in my private reply to you but I don't think I explained it very well. The exact same line would be written like this in proper code:

while (guess <=number or guess>= number)

In short, you have to specify the variable to check in both parts of your expression.

Kind regards,

Philip Bennefall
----- Original Message ----- From: "Casey Mathews" <[email protected]>
To: "Gamers Discussion list" <[email protected]>
Sent: Friday, March 26, 2010 10:29 PM
Subject: [Audyssey] BGT Error: Expected expression value


Hello. I'm very impressed with BGT. I'm trying to make my own guess the number game, just to try and get familiar with the sintax. I can't figure out what I'm missing. I've looked at the examples in the tutorial, and downloaded all of the examples from the web. The error is below, follloed by my simple attempt. Thanks for any help.
Line: 5 (26)
Error: Expected expression value

void main()
{
alert("Number Guesser","Try to guess my number. I'll let you know if you're too high, or too low. Make your guesses between numbers 1, and 10. Have fun!");
int number=random(1, 10);
while (guess <=number or >= number)
{
int guess = input_box("Guess","What's your guess?");
if (guess == number)
{
input_box("You Won!","You guessed my number!");
}
else
{
alert("Your Guess","Your guess was "+guess+".");
}
}
}

---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to [email protected].
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of the list, please send E-mail to [email protected].


---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to [email protected].
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of the list,
please send E-mail to [email protected].

Reply via email to