Displays a pop-up message for the user to input a string.


get_string(str, def);

Argument Description
str The string to show in the pop-up message.
def The default string in the text box.

Returns: String


This creates a pop-up window showing a standard message, with a button labeled "Ok", that prompts the user to input a string. The function will return the input string, or the default value if nothing has been entered.

NOTE: THIS FUNCTION IS FOR DEBUG USE ONLY. Should you require this functionality in your final game, please use get_string_async.


global.test_name = get_string("Test highscore name:", "Anonymous");

The above code will prompt the user to give a name which will then be stored in the global variable "test_name". If nothing is entered and the user just presses "Ok" then the default value,"Anonymous", will be returned.

Back: Debugging
Next: show_error
© Copyright YoYo Games Ltd. 2018 All Rights Reserved