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.
-
agargara
- Prole
- Posts: 5
- Joined: Fri Aug 18, 2017 9:44 am
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
in my conf.lua. Setting it to true solved the problem.
Oops....
I guess I'll leave this thread up for anybody who repeats my mistake.
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 45 guests