Jump to content

[HELP] Custom chat input bug


Turbe$Z

Recommended Posts

		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? o.O

Link to post
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? o.O

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...? :D)

Edited by stPatrick
  • Thanks 1
Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...