Posted 28 July 2012 - 08:15 PM
I need some help with this code, I am very very new to lua (Because of this mod xD) and I can't seem to get this code to work. Please help me any way that you can, or find the error(s) that there are…. Thanks
Also, I had to use "Type anything else to cancel" Because I do not know how to make "yes / no" option work.
os.pullEvent = os.pullEventRaw
term.clear()
term.setCursorPos(1,1)
write("Install Disk Player?")
write("Type Yes to proceed! Type anything else to cancel!")
local input = read()
if input == "Yes" then
term.clear()
term.setCursorPos(1,1)
textutils.slowPrint("Installing Disk Player...")
os.sleep(4)
fs.delete("romDisk Player")
fs.copy("diskDisk Player,romstartup")
write("Disk Player Installed Successfully!")
sleep(1)
textutils.slowPrint("Ejecting Disk")
sleep(2)
textutils.slowPrint("Restarting Computer")
sleep(2)
os.reboot()
else
textutils.slowPrint("Cancelling Installation...")
os.sleep(2)
textutils.slowPrint("Ejecting Disk")
os.sleep(2)
term.clear()
term.setCursorPos(1,1)
os.reboot
end
Also, I had to use "Type anything else to cancel" Because I do not know how to make "yes / no" option work.