Posted 31 December 2014 - 08:47 AM
This is my first 100% "me" project and this one if/else statement is getting the better of me and will always go else when I seem to meet all the demands. Maybe someone else can see the error that I cannot.
Computer startup:
Key:str
my startup is on the key rather than the rom, but can only be accessed through a program called "str". Thanks for reviewing this.
Computer startup:
os.pullEvent = os.pullEventRaw
while true do
if disk.hasData("bottom") == true then
disk.eject("bottom")
end
term.clear()
print("place key, say OK") -- I place key in disk drive, type OK --
input = read()
if input == "OK" and fs.exists("disk/str") == true then
shell.run("disk/str")
else
term.clear()
term.setTextColor(colors.red)
print("Credentials Incorrect")
disk.eject("bottom")
print("Shutting down")
os.sleep(2)
os.reboot(1)
end
end
Key:str
shell.run("startup")
my startup is on the key rather than the rom, but can only be accessed through a program called "str". Thanks for reviewing this.
Edited on 31 December 2014 - 03:49 PM