Hey, I am trying to get my game to accept UTF-8 strings but my code wont work anymore after I added it.
I am making a simple hangman game and it wont recognize UTF-8 letters, as I am using utf-8.match etc. I also cannot combine UTF and “normal letters”, for example “B” and “Ø” would give me an error like this:
“bad argument #2 to ‘match’ (string expected, got nil)”
The game works like this. I type my hangman word, game splits the letters using utf8:sub and stores them in an table. I then use a for loop to utf8:match the table to a letter I type in.
I am not used to posting on forums, sorry in advance if I am missing something. I am not sure what code I shall post.
Please help a clueless coder!