Code: Select all
function love.keypressed(key,scancode,isrepeat)
if isrepeat == false then
print(key)
input.HandleInput(key)
end
end
When I press a button if its not a repeat then it prints the key to the console and then calls my HandleInput function. This works fine in main.lua. However in the input script:
Code: Select all
function input:HandleInput(key)
print(key)
table.insert(input.keys,key)
end
Hopefully someone can shed some light on this.
EDIT: As a consequence this means its also trying to insert nil into my table.