[Solved] Text entry miscellaneous

can someone give me some ideas or tips to do the following:
i wanna use test entry object to take input by user but only 5 characters, let say a player want to set any name, he cant type more than 5 characters
.I tried it this way, i checked the string length and when it is 5 i deactivate the text entry object but that way if user wanna use backspace and edit his name then he cant do that so this strat didnt work
please help me out with problem


Just check the length of the string ( StrLength(VARIABLE.String()) ) and then make a check if (length of string) is bigger than 5 then do SubStr(TEXTENTRY.String(),0,5) to the text of TEXTENTRY.

no that way if user want to use backspace, let say max 5 characters if he types xxxxx then after that if he presses keys it wont show up in the text sure but it will be feeded in text entry object as xxxxxxxx(more than 5 characters) and then if he tries to edit and press backspace then there wont be anychange for couple of backspaces until there are 5 charc left.

No, I meant every time a key is pressed, check the length and if the length is too high, change the text in memory of the textentry to the trimmed string.

oh yea that worked thanks