[Thread Prev] [Thread Next]
On 8 Nov 2006 at 7:22, Burke, Bridget -CKJH wrote:
> This program works on my computer but not on others.
> What is going on?
Hi Bridget,
in the MW Pro help if found this:
talkto -Technical information-
Be aware that if you give talkto a list as input, the who reporter will report
a list. This
could cause problems with primitives such as towards and distance, which could
take who as an
input.
(it seems that the MW Ex help does not have this piece of information)
So, the following code seems to fix your problem:
to whos
ask [t2 t3 t4 t5 t6] [
forever [check rt 90 fd 20 wait 5]
]
end
to check
if touching? who "t1 [announce [hello]cc]
end
> Can someone give an explanation of who?
Who is a reporter, I reports the current turtles (it can be one)
if you say:
tto [t2 t3 t4 t5 t6]
then there are many current turtles
touching? expects two turtle names and does not know what
to do with something like
touching? [t2 t3 t4 t5 t6] "t1 ...
There have been a few instances of this misuse of tto reported to
this list. It's a common "gotcha"
I've still to find something that "tto" can do, that "ask" cannot.
Daniel
OpenWorld Learning
Previous by thread:
RE: who
Next by thread:
RE: who
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.
|