Posted 03 March 2012 - 04:40 AM
How would I go about making multiple choices? (As in, press 1 for ___ and 2 for ___)
print("Press 1 for pie, and 2 for cake.")
local input = read()
if input == "" then -- The user just pressed enter
print("How about some errors instead?")
error("User refuses pie and/or cake.")
elseif input == "1" then
print("Here's your pie.")
elseif input == "2" then
print("Here's your cake.")
else
print("There is no option 3.")
end