Skip to content
This repository has been archived by the owner on Oct 24, 2020. It is now read-only.

btn() and btnp() can't take emojis as arguments #28

Open
tobiasvl opened this issue Aug 9, 2018 · 0 comments
Open

btn() and btnp() can't take emojis as arguments #28

tobiasvl opened this issue Aug 9, 2018 · 0 comments

Comments

@tobiasvl
Copy link

tobiasvl commented Aug 9, 2018

In PICO-8, the following code:

  if (btn(⬅️)) print("left")
  if (btn(➡️)) print("right")
  if (btn(⬆️)) print("up")
  if (btn(⬇️)) print("down")
  if (btn(🅾️)) print("o")
  if (btn(❎)) print("x")

is equivalent to:

  if (btn(0)) print("left")
  if (btn(1)) print("right")
  if (btn(2)) print("up")
  if (btn(3)) print("down")
  if (btn(4)) print("o")
  if (btn(5)) print("x")

However, in picolove, the if tests in the first example will always evaluate to true.

See also #27.

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

1 participant