Problem with tables
Posted: Fri Nov 09, 2012 8:54 am
Hey guys,
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.
Code:
The solution to my problem probably is very easy but some help would be appreciated Thanks in advance.
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.
Code:
Code: Select all
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