[Thread Prev] [Thread Next]
Hello,
That's because when you use (index1 + 1), the index1 that you are
getting is the index1 of the CURRENT turtle. So when you say
t2, setindex1 (index1 + 1)
you are in fact asking t2 to set its variable index1 to "its own
index1 value" plus one. And at this point, its own index1 value is [ ]
Solution
t2, setindex1 1 + ask "t1 [index1]
Alain Tougas
alain@xxxxxxx
B: (514) 939-8700 poste 237
Le 07-05-17 à 06:03, zehava wizman a écrit :
Hello Forum!
I used turtlesown command to assign state variable to all
turtles,called Index1, then I want to build newturtle getting the
value of index1 + 1.
I got error message about + , Why can't we assign the previous
value and add 1 like we do in variable? even when I write t2,
setindex1 (index1 + 1) I got an error.
Here attached the file.
Zehava
Looking for earth-friendly autos?
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
<turtlesown.mw2>
Previous by thread:
problem with "turtlesown" values
Next by thread:
New issues
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.
|