Cameron Cheung
Cameron Cheung

Reputation: 319

Netlogo: seting a global variable to a single patch

I'm trying to set a global variable to be a single patch that has the machine-type "riveter". The global variabe is active-patch. There is only one patch with that machine-type in the world. The machine-type is a patches-own variable.

  set active-patch one-of patches [machine-type = "riveter"]

I've tried this but it expects a command inside the brackets.

Upvotes: 1

Views: 71

Answers (1)

JenB
JenB

Reputation: 17678

you're missing the with

set active-patch one-of patches with [machine-type = "riveter"]

Upvotes: 2

Related Questions