netlogo - LINK expected input to be a number but got the turtle (turtle 26) instead -
how can assign link variable. there run time error in code when run line
let link-who link node2-who this-one node2-who , this-one turtles.
and runtime error :
link expected input number got turtle (turtle 26) instead.
the procedure link takes who numbers of 2 turtles , returns link connecting them. you're getting error because @ least 1 of inputs you're giving turtle, not who number.
now, said, recommend avoiding using who numbers @ (except in special circumstances). instead, if want link between current turtle , other turtle, can do
link-with other-turtle
where other-turtle other turtle (it called node2 in case).
Comments
Post a Comment