Sumit Dutta
Sumit Dutta

Reputation: 47

NetLogo : Redeclaration of turtles-own

I am a beginner with NetLogo and am having troubles declaring variables as attributes of a turtle. I want 2 variables to be properties of turtles but when I use turtles-own second time, it throws an error saying Redeclaration of turtles-own. Is there any other way to do this?

Upvotes: 2

Views: 809

Answers (1)

Bryan Head
Bryan Head

Reputation: 12580

You can just list all turtle variables in one turtles-own, like so:

turtles-own [
  one-variable
  another-variable
]

Upvotes: 4

Related Questions