4
我想設置一個補丁變量等於該補丁上的龜的數量。如何設置一個補丁變量作爲龜的數量 - 這裏
我已經試過
ask patches [set variableA (count turtles-here)]
當我這樣做,我得到的錯誤:「集預計2個輸入」
我試圖通過設置龜數爲PLABEL
使用變通ask patches [set plabel (count turtles-here)]
代碼工作,但我需要爲多個變量做到這一點,當我試圖在轉移PLABEL給變量
ask patches [set variableA plabel]
我再次得到錯誤: 「SET預計2個輸入」
任何幫助表示讚賞。