INPUT: Difference between revisions
From Dark Signs Online
Jump to navigationJump to search
(Created page with "''string'' '''INPUT'''(''string'' message) Get input from the user. Returns the given string. == Parameters == ''message'' This will be printed before the cursor. == Example == Sample menu script, using INPUT. <pre>SAY " [0] Item 1" SAY " [1] Item 2" SAY " [2] Quit" $in = INPUT(Make your choice) IF $in = 0 THEN SAY Item 1 ELSE IF $in = 1 THEN SAY item 2 ELSE IF $in = 2 THEN SAY Bye! EXIT ELSE SAY Invalid input! END IF</pre>") |
(No difference)
|
Latest revision as of 05:55, 18 March 2024
string INPUT(string message)
Get input from the user. Returns the given string.
Parameters
message This will be printed before the cursor.
Example
Sample menu script, using INPUT.
SAY " [0] Item 1" SAY " [1] Item 2" SAY " [2] Quit" $in = INPUT(Make your choice) IF $in = 0 THEN SAY Item 1 ELSE IF $in = 1 THEN SAY item 2 ELSE IF $in = 2 THEN SAY Bye! EXIT ELSE SAY Invalid input! END IF