title: Error in NetLogo: Nothing named x has been defined
body: <p>I exported a landscape from NetLogo. I imported this same landscape in Netlogo. From this landscape, I added another global variable specific to patches "residency-time":</p>
  
  <pre><code>globals [
  list-of-polygons ]
  
  patches-own [ 
  area-ha
  residency-time 
  ]
  </code></pre>
  
  <p>I created a function to assign a value of residency time to each polygon in my landscape</p>
  
  <pre><code>to assign-residency-times
  set list-of-polygons ([ID-polygon] of patches)
  set list-of-polygons remove-duplicates list-of-polygons 
  set list-of-polygons remove 0 list-of-polygons
  print sort list-of-polygons
  
  foreach list-of-polygons [ 
  ask patches with [ ID-polygon = ? ] [ 
  if all? patches [pcolor = green] [ 
  set residency-time exp(1.02 * area-ha) ]
  
  .... ] ]
  </code></pre>
  
  <p>I don't understand why I have this error message : <code>Nothing named area-ha has been defined</code>. However, I defined <code>area-ha</code> dans <code>patches-own</code>. 
  In addition, when I inspect a patch, all global variables specific to patches disappeared (see figure below) !</p>
  
  <p><img src="https://i.stack.imgur.com/9Ox5z.png" alt="enter image description here"></p>
  
  <p>Thanks in advance for your help.</p>