INPUT

From Dark Signs Online
Revision as of 04:55, 18 March 2024 by Doridian (talk | contribs) (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>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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