I'm trying to change a string such as "Up", to the integer 38.
So far, i've gotten all the lines from a file and added them to an ArrayList called "controls".
The file that I get the strings from looks like this:
The code that i've tried using to convert it is as follows:
When i try this, the ifs don't work (as in, the strings don't match), and they just return the 0, and i don't know why.
Please help...
PS. I'll find a way to add all keys to the keycode method later on.