[Thread Prev] [Thread Next]
On Thu, 20 Mar 2008 13:43:36 -0500, Tamara Weinstein
<tamaraw@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> i changed some things but it still isn't working. i have now put the
> cheese instructions in the cheese's backpack.
> let me know what else you find
> thanks
> tw
>
Hi Tamara,
When the mouse touches the cheese the following procedure is run:
to yum
if touchedturtle = "mouse
setsize 100
wait 20
announce [You got to the mousehole!]
end
and the following error is issued:
setsize didn't report anything to if in yum
That is a because *something* is expecting "setsize" to report something.
More specifically, "if" is expecting "setsize" to report something. That is
because "if" expects to receive *two* things:
if condition instruction.list
you are saying:
if condition setsize ...
so "if" is expecting setsize to give it an instruction.list
In short, you forgot the brackets:
to yum
if touchedturtle = "mouse [
setsize 100
wait 20
announce [You got to the mousehole!]
]
end
that way, the instruction list that "if" receives is:
[
setsize 100
wait 20
announce [You got to the mousehole!]
]
The following is wrong:
to ouch
if touchedturtle = ["t1 "t6 "t5 "t2 "t3 "t4]
[announce [You got eaten!]]
end
it should be:
to ouch
if member? touchedturtle [t1 t6 t5 t2 t3 t4]
[announce [You got eaten!]]
end
Because touchedturtle reports a word and the "equal sign" can't make sense of
this:
word = list
Daniel
OpenWorld Learning
Previous by thread:
Re: cat and mouse
Next by thread:
MIA, Ask an Expert: order of evaluation
To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.
|