I am creating a netlogo program where patches own two variables, one is "cheiro" and the other is "tempo".
The turtles are walking around the patches and before moving they check manually each patch around if the patch has cheiro = 1. This is the code I have and it gives me an error.
ask patch-ahead 1[
if cheiro = 0 [set m1 patch-ahead 1]
]
]
The error given is " You cant use PATCH-AHEAD in a patch-context, because PATCH-AHEAD is turtle-only.
I also tried
if patch-ahead 1 with [cheiro = 0][set m1 patch-ahead 1]
But was given error saying "WITH expected this inpput to be an agentset, but got a number instead."