Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.

Invalid key constant error with Love2D 11.0 #22

Open
Ristovski opened this issue Apr 3, 2018 · 8 comments
Open

Invalid key constant error with Love2D 11.0 #22

Ristovski opened this issue Apr 3, 2018 · 8 comments

Comments

@Ristovski
Copy link

Ristovski commented Apr 3, 2018

According to the changelog

Changed love.keyboard.isDown and love.keyboard.isScancodeDown to error if an invalid enum value is given.

the check on line 171 will now error on Love2D 11.0 for mouseX keycodes.

@flamendless
Copy link

Ive had this similar issue with lovedebug, but does this library modify the love.run?

@nyorem
Copy link

nyorem commented Apr 5, 2018

I did some stuff here: nyorem@26bf55d

I don't know if it is the correct way of doing it or the most optimized one but it works for me.

@pablomayobre
Copy link

Does that fix the issue for mouse1 and such?

@nyorem
Copy link

nyorem commented Apr 5, 2018

Yes, it should.

@coelhucas
Copy link

hello, @nyorem I'm still having the error with mouse1 at the line 194, do you know what could be?

@nyorem
Copy link

nyorem commented Apr 26, 2018

You may be right, I only tested for key presses. I'll look at it this evening.

@pablomayobre
Copy link

I suggest using pcall to call love.keyboard.isDown and love.mouse.isDown

@nyorem
Copy link

nyorem commented Apr 27, 2018

I updated my fork to correctly handle the mouse. Tell me if it works @lcrabbit.
@positive07 : thank you for your suggestion. I'm still new at Lua and didnt' know about pcall. I'll look at it when I have time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants