get_integer(str,def)

str = The message you want displayed to the user.

def = A default number that appears in the input box.

 

Example #1

age = get_integer("What is your age?",12);

 

get_integer is very much like get_string(), but will pop up an input dialog box that will allow the user to enter a number, str is the message you want displayed on this dialog box and def is a default number that will be automatically placed inside the input box. There must be a default number, you cannot leave it empty. Also note that the default number is not surrounded by quotes.

 

You can also use a variable for the default number if need be although the variable must hold the string of that number:

 

Example #2

age = "66" // Note this is a string

age = get_string("What is your age?",age);

 

Revision #1