love.keyboard.isDown() error [SOLVED]

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
agargara
Prole
Posts: 5
Joined: Fri Aug 18, 2017 9:44 am

love.keyboard.isDown() error [SOLVED]

Post by agargara »

The following code:

Code: Select all

function love.update(dt)
    if love.keyboard.isDown('h') then
        print('h')
    end
end
Gives me the error:

Code: Select all

attempt to index field 'keyboard' (a nil value)
What am I missing? I couldn't find anything in the documentation about love.keyboard being deprecated.

EDIT: Of course I figured it out one minute after I posted this...
I had

Code: Select all

t.modules.keyboard = false
in my conf.lua. Setting it to true solved the problem.

Oops.... :oops: :oops: :oops: :oops:

I guess I'll leave this thread up for anybody who repeats my mistake.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 48 guests