Set maximum chat length?


I'm having a problem with the built-in chat system.
When a player types more than 1 line chat, this happens:

So is there any ways to set the maximum number of letters the player can type in the chat?

Thanks in advance!

Replies (3)

Last message on 11 Jan 2017

matthe815 on 11 Jan 2017, 03:12:06
You can do something like I did.

<any key>:
if string_length(keyboard_string) < 46 {
    last_text = keyboard_string;
} else {
    keyboard_string = last_text;
matthe815 on 11 Jan 2017, 03:13:06
You can also using string_width to specify a width.
Size43 (Administrator) on 16 Dec 2016, 21:10:08
The chat uses draw_text_ext to draw the wrapping text. Unfortunately, that does sometimes show up like this. As far as I'm aware, there's no fix unfortunately.