You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello
I would like to make a simple grab keys python3 script, that gets the keys and then checks the list if there is a key or not and then returns an array. I tried this: #Takes string returns array! def keys_to_array(key): if key == "w": return [0, 1, 0] elif key == "a": return [1, 0, 0] elif key == "d": return [0, 0, 1] else: return "Not working as supposed or None!"
Please help it is not working as supposed and returning Not working as supposed or None!. I suppose there is a problem that the key that is returning is not a string but NoneType. But i dont know
Petr Gardas
The text was updated successfully, but these errors were encountered:
Hello
I would like to make a simple grab keys python3 script, that gets the keys and then checks the list if there is a key or not and then returns an array. I tried this:
#Takes string returns array! def keys_to_array(key): if key == "w": return [0, 1, 0] elif key == "a": return [1, 0, 0] elif key == "d": return [0, 0, 1] else: return "Not working as supposed or None!"
Please help it is not working as supposed and returning Not working as supposed or None!. I suppose there is a problem that the key that is returning is not a string but NoneType. But i dont know
Petr Gardas
The text was updated successfully, but these errors were encountered: