Input restrictions
-
Is there a way to restrict how many characters someone can type for input
-
If you are able to monitor the amount of letters typed, then have a variable that stores the number of presses and when it gets to its limit stop the code for it. I honestly havent tested any of that but it's an idea :v
-
What I did for this was just check the length of the string variable their input went in to, then called my input function again if it was too many.
function getInput() theirText = input("Don't type more than ten characters:") if len(theirText) > 10 then getInput() endif return void
-
Ok thanks @Spacemario
-
Is input like scanner in java ?
-