I am making a two-player hangman game, and I have set a limit of 10 characters which is working fine:
on keyDown
if the length of me = 10 then
beep
else
pass keyDown
end if
end keyDown
However, when I try to limit the character input to only lowercase characters, nothing seems to happen. I can still type any character I want.
on keyDown inkey
if inkey is in "abcdefghijklmnopqrstuvwxyz" then
pass keyDown
else
beep
end if
end keyDown
How do I fix this? Thankyou.