title: Attempt to perform arithmetic on field 'x' (a table value)
body: <p>I'm working with <a href="https://code.google.com/p/lua-alchemy/" rel="nofollow noreferrer">lua-alchemy</a>, and I'm setting a global variable in my AS3 code in this way:</p>
  <pre><code>_lua.setGlobal(&quot;map&quot;, _map);
  </code></pre>
  <p>With _map being a object with the following function in it:</p>
  <pre><code>public function get x():int
  {
      return 10;
  }
  </code></pre>
  <p>if then I try to do something like this in Lua</p>
  <pre><code>local a = map.x + 1
  </code></pre>
  <p>I get the following error:</p>
  <pre><code>Lua script failed: luaDoString:21: attempt to perform arithmetic on field 'x' (a table value)
  </code></pre>
  <p>Does anyone knows why it does that, and how I could fix it?</p>
  <p><strong>EDIT :</strong></p>
  <p>When I print <code>type(map.id)</code>, it prints <code>table</code>... Shouldn't it print <code>number</code>?</p>