Help with errror
Posted: Thu Feb 06, 2014 8:05 pm
I am getting the error message,
main.lua:29:attempt to call method 'flip'(a nil value)
here is the function that contains that line of code highlighted in yellow.
I'm new at Love, please help.
main.lua:29:attempt to call method 'flip'(a nil value)
here is the function that contains that line of code highlighted in yellow.
I'm new at Love, please help.
Code: Select all
function love.load() ---loads all we need in game
character = {}
character.player = love.graphics.newImage "gripe.run_right.png"
character.x = 50
character.y = 50
direction = "right"
iteration = 1
max = 8
idle = true
timer = 0.1
quads = {}
quads['right'] = {}
quads['left'] = {}
for j=1,8 do
quads['right'][j] = Quad((j-1) * 32, 0, 32,32, 256, 32);
quads['left'][j] = Quad((j-1) * 32, 0, 32, 32, 256, 32);
-- for the characgter to face the opposite
-- direction, the quad needs to be flipped
-- by using the Quad:flip(x,y) method, where
-- x and y are Boolean.
[color=#FFFF00]quads.left[j]:flip(true, false)[/color] --flip horizontaly x = true, y = false
end
end