with this code:Syntax error: main.lua:6: '}' expected (to close '{' at line 4) near 'local'
Code: Select all
local anim8 = require "anim8"
function love.load()
player {
img = love.graphics.newImage("sheet.png")
local g = anim8.newGrid(72, 117, img:getWidth(), img:getHeight())
anim = anim8.newAnimation(g('1-7',1), 0.1)
}
end
function love.update(dt)
player:update(dt)
end
function love.draw()
player:draw(img, 100, 100)
end
basically, i wanted to put all the animation parameters inside a player table but it keeps giving me errors and i don't understand what i'm doing wrong
any help is appreciated