Posted 22 April 2013 - 03:02 AM
I got a lot down already, but there appears to be a problem…
I keep getting the error: bios:338: [string "startup"]:40: 'end' expected (to close 'if' at line 15)
I also want it to execute the command "cp doorLock disk/startup" one line before "disk.eject("back")" but I have no idea what that would look like in lua, so… revise and explain,fool please. thanks in advance
local option1 = "1"
local describe1 = "1*"
local exit = "exit"
print("Welcome, customer.")
print("Please pick a card type to be burned: ")
print("")
print("1. Door Combo")
print("")
print("Add a '*' after your order to view product description.")
print("Example: '1*'")
print("")
term.write(">")
local input = read()
if input == option1 then
term.clear()
term.setCursorPos(1,1)
print("Burning Disk...")
sleep(5)
print("")
print("Please collect your disk at the door.")
disk.eject("back")
sleep(5)
os.shutdown()
elseif input == describe1 then
term.clear()
term.setCursorPos(1,1)
print("Door Combination Lock")
print("Censors input characters with stars.")
print("Program termination locked without password.")
print("Automatic shutdown to reset program")
print("")
print("Type 'exit' to return to the main menu")
print("")
term.write(">")
local input = read()
if input == exit then
os.reboot()
end
I keep getting the error: bios:338: [string "startup"]:40: 'end' expected (to close 'if' at line 15)
I also want it to execute the command "cp doorLock disk/startup" one line before "disk.eject("back")" but I have no idea what that would look like in lua, so… revise and explain,