So we're trying to concat log and i. When that happens we will be able to identify the log by its log number. ex log256 and log320
log..i doesn't concat it so any help would be appreciated. We're new to love2d.
logs = {}
for i=64, 1856, 192 do
local key = log..i
logs[key] = whatever
end
But I am not sure what you try to achieve by assigning the return value of love.graphics.draw to a variable. love.graphics.draw does not return anything.
Furthermore, it is probably much better to use the number i as key directly instead of turning it into a string:
for i=64, 1856, 192 do
love.graphics:reset()
logs = {["log" .. i] = love.graphics.draw(logImg, i, 896)}
end
Sadly, semantically this isn't what you want at all. I doubt you want to reset the graphics every iteration (and it's love.graphics.reset, not love.graphics:reset), nor would you want to recreate the 'logs' table every iteration. And, of course, as micha said, love.graphics.draw doesn't return anything, and you'd probably just want the keys to be numbers anyway.