I was working on this project about a year ago. I came back to it and now it throws an error when I run it the error is "attempt call field "drawers"(a table value)".
This is where the drawers field is
local Renderer = {}
local num_of_layers = 2
local insert = table.insert
local remove = table.remove
function Renderer:create()
local render = {}
render.drawers = {}
for i = 0, num_of_layers do
render.drawers[i] = {}
end
function render:addRenderer(obj, layer)
local l = layer or 0
insert(self.drawers(l), i, obj)
end
return render
end
return Renderer
This is where it is being called
local tlm = {}
function tlm:load()
renderer:addRenderer(self)
gameloop:addLoop(self)
end
Rendererand the lowercaserenderer, and the functionRenderer:createdoesn't actually have an end, from our point of view. Could you make the code a little clearer? - user6245072drawersis actually a table containing some tables, but you're calling it passinglas an argument fromrenderer:addRenderer. Again, I can't understand what you wanted to do. - user6245072