GM: get integer
From GMpedia.org Wiki
- The correct title of this article is get_integer(str,def). It appears incorrectly here because of technical restrictions.
- The correct title of this article is get_integer(). It appears incorrectly here because of technical restrictions.
Arguments
str = The message you want displayed to the user.
def = A default number that appears in the input box.
Limitations
none
Note: Please remove limitations and port them in the "Remarks" section at the end of the article.
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, as it is a real value (not a string).
[edit] Example
You can use a variable for the default number if need be although the variable must hold the string of that number: age = 66; // Note this is a real number age = get_integer("What is your age?",age);
See the talk page for details

