How to create a global array in netlogo -


i trying create array can accessed of patches, seems though setting global, available in function in gave value. have following 3 segments of code in respective places:

globals[a]

toward top of program, in setup function have

set array:from-list n-values asize [0]

for integer asize defined in setup function, , go method calls function addtoarr runs following line:

array:set index val

for index , val defined earlier in function. might worth noting within ask patches. when run code following error:

extension exception: not array: 0 error while patch 70 91 running array:set called procedure addtoarr called procedure go called button 'go-forever'

i confused error, because seems me defined a array, netlogo differs in opinion. netlogo not support global arrays? appreciated.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -