Problem with the "input:down" function
Closed this issue · 1 comments
jr-uk commented
I'm running through the Love2d tutorial and the below code causes the below error
function love.update(dt)
if input:down('kp+', 0.25) then increment() end
end
"Error
libraries/boipushy/input.lua:166: bad argument #1 to 'ipairs' (table expected, got nil)
Traceback
[C]: in function 'ipairs'
libraries/boipushy/input.lua:166: in function 'down'
main.lua:51: in function main.lua:48
libraries/boipushy/input.lua:61: in function 'update'
[C]: in function 'xpcall'"
jr-uk commented
Resolved, my error. Needed to associate with an action not a key.