Translation of Values for Letters in Lua

Asked

Viewed 55 times

1

I was trying to create a function in moon that serves for the user to write in the terminal, I am using a modified version of the moon so I need that when the keyboard sends me the key code pressed I can take this code and see:

16 = q

17 = w

18 = and

19 = r

20 = t

21 = y

Anyway, how can I do this without writing 15 thousand if Cod == 16 then keypressed = q?

  • 1

    How about two arrays, one with the letters and the other with the number in the position corresponding to each letter?

  • I don’t know how you do it but I’ve finished my software

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.