Turbe$Z Posted December 6, 2019 Share Posted December 6, 2019 if key == 'backspace' and ePress then chat.input = string.sub(chat.input, 0, string.len(chat.input) - 1) end The backspace working with default characters (a,b,c,d...), but when i type a special character, for example: á, é, ű, ő, ü...etc., the backspace not working, what wrong? Link to comment
Moderators Patrick Posted December 6, 2019 Moderators Share Posted December 6, 2019 (edited) 32 minutes ago, Turbe$Z said: if key == 'backspace' and ePress then chat.input = string.sub(chat.input, 0, string.len(chat.input) - 1) end The backspace working with default characters (a,b,c,d...), but when i type a special character, for example: á, é, ű, ő, ü...etc., the backspace not working, what wrong? Because éáőúűüóüö are utf8 characters and string libary dont support it. You need to use utf8 ones: https://wiki.multitheftauto.com/wiki/Utf8.sub https://wiki.multitheftauto.com/wiki/Utf8.len (nyitás előtt kell ezeket csinálni...? ) Edited December 6, 2019 by stPatrick 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now