Without testing it, I can see two problems. First report ticks
should have brackets around it. Second, if the if
condition is false, then the reporter will hit the end
statement without reporting anything, which NetLogo will see as an error. Reporting -1
in such a case would make NetLogo happy, but you'll need to think about what that will mean for your monitor.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…