(I edited your post to your post in a code block so it is easier to read as code. See tip #6 on this post)
A few things:
- Replace all
“
and”
with straight quotes"
. pxcor-of farthest-building
should be[pxcor] of farthest-building
The end of the setup procedure needs to be inside of an ask patches
like this:
ask patches [
; Set one adjacent patch as building (black)
let adjacent-patch one-of neighbors4 with [land-use = "green"]
ask adjacent-patch [
set land-use "building"
set pcolor black
]
]
After that, though you’ll likely get an error for that code, because adjacent-patch
might be nobody. So, you’ll need to change it to:
That seems to solve all the errors.