Character limitation for get_string_async

K

Kurt

Guest
Hi folks,

is there a way to limit the characters for get_string_async, so that you can enter a maximum of, lets say, 8 characters?

Thanks in advance and best regards
Kurt

GM:S Professional 1.4.1757
 

Yal

šŸ§ *penguin noises*
GMC Elder
You could always use string_copy() to get the 8 first characters of the input (do a string_length() check first to see if it is too long) AFTER it has been inputted. It's not the most elegant solution, but it works. (I'd at least tell the user about the limitation in beforehand, though)
 
K

Kurt

Guest
I don't want to be a gravedigger, but I need to thank you for the hints!

I'll definitely have a look into your suggestions!
 
Top