title: Lua Index Expected, got function
body: <p>The <code>data</code> variable is a parameter in a function. <code>sheeple</code> is an instantiated table. I printed out the type of <code>id</code> and <code>data</code> which printed "number" and then "string" respectively. However, upon the execution of <code>sheeple[id]=data</code>, I get the error "index expected, got function." Thank you for any help.</p>
  
  <pre><code>    local id = 0
      local tmp  = data:sub(8)
      tmp = tmp:sub(1,tmp:find("[^0-9]")-1)
      id = tonumber(tmp) 
      queue(id)
      print(type(id))
      print(type(data))
      sheeple[id]=data
  </code></pre>