CRUGG, on 28 April 2018 - 11:38 AM, said:
How can I make the text input and save the entered text into a variable
You'll want the
read function for this:
local msg = read()
CRUGG, on 28 April 2018 - 11:38 AM, said:
How can I make it, that something will be executed, if the entered text isn't "install", "uninstall" or "exit"
If you convert all but the "end if"s into "elseif", you can then have a fallback:
if msg == "install" then --# Your code
elseif msg == "uninstall" then --# Your code
elseif msg == "exit" then --# Your code
else
error("Unknown command!", 0) --# Will print an error and exit
end
Also note the use of double equals (checking equality) rather than single equals.
CRUGG, on 28 April 2018 - 11:38 AM, said:
How can I make the program exit when entering exit
If this is on the top-level/in a loop just use return:
--# ...
elseif msg == "exit" then
return
else
--# ...
Otherwise you could use error with some friendly message.