I’m making a textbox for players to enter a file location or file name for a screenshot or video they have captured during gameplay.
The plan is this:
- Player enters their string
- If ANY part of the string contains a character that’s not allowed an error message appears
- If the text is committed with illegal characters it reverts to the last legal string (i have the set last valid text set up)
I’ve tried quite a few things. I know how to set and clear error boxes/string and revert to a previous string but I need the logic to be able to check that the character entered is illegal with each character typed and if one character is illegal it doesn’t matter if the rest of the string is fine, it will revert to the last legal string on committing the entry.