Abhishek Bhatia
Abhishek Bhatia

Reputation: 9814

Can't understand simple Netlogo error

show sort-on [who] [turtles]

gives error

Expected an agentset here, rather than a list or block.

I can't understand the error turtles is an agenset isn't it? I have copied it from Netlogo dictionary!

Upvotes: 1

Views: 133

Answers (1)

Bryan Head
Bryan Head

Reputation: 12580

Remove the square brackets from around turtles. turtles on its own is the agent set containing all turtles. Putting square brackets around stuff either makes it a list or command/reporter block.

The error is saying that sort-on wants an agent set for one of its arguments, but you've given it a something that could be a list or block.

Upvotes: 2

Related Questions