title: Objects in Arrays Help Lua?
body: <p>So, I have an array </p>
  
  <pre><code>//loop here
  nummobs = nummobs + 1
  Mobs = {}
  Mobs[nummobs] = Entity.Init(x(locations to spawn mob), y(locations to spawn mob),"testMob")
  </code></pre>
  
  <p>Then, call the draw method...</p>
  
  <pre><code>for i = 0, table.getn(Mobs) do
      Mobs[i].draw()
  end
  </code></pre>
  
  <p>Error: map.lua:54(Mobs[i].draw() line): attempt to index field '?' (a nil value)... BUT IT HAS SOMETHING IN IT! right?</p>
  
  <p>Anyone ever try something like this? Can anyone fix it?</p>
  
  <p>Thanks</p>
  
  <p>Nate</p>