I got a small problem with retrieving information out of a 2d table, anyone mind giving me a hand? Basically what I'm trying to do is retrieve information out of a table for cutting up my spritesheet with quads.
local tilequads=
{
{40,0},
{40,0},
{80,0}
}
for i = 1, #tilequads do
local info = #tilequads[i]
--print(info[1])
--tile[i] = love.graphics.newQuad(info[1], info[2], Grid.tilewidth, Grid.tileheight, tilesetW, tilesetH)
end
The solution to my problem probably is very easy but some help would be appreciated Thanks in advance.
for i = 1, #tilequads do
local info = tilequads[i]
--print(info[1])
--tile[i] = love.graphics.newQuad(info[1], info[2], Grid.tilewidth, Grid.tileheight, tilesetW, tilesetH)
end