Posted 29 October 2012 - 04:04 AM
So I edited this program because I am making a Fallout Vault in my server, and whenever I try to run the program, it says "startup:4: attempt to call nil"
I'm fairly new into ComputerCraft and I wanted to get more into it, but I'm stuck on this one. Could anyone help me out with this?
term.clear()
term.setCursorPos( 1, 1 )
printString("WELCOME TO ROBCO INDUSTRIES (TM) TERMLINK", 1, 1)
printString("", 1, 2)
printString(">", 1, 3)
sleep(1)
printString("SET TERMINAL/INQUIRE", 2, 3)
printString("", 1, 4)
sleep(1)
printString("RIT-V300", 1, 5)
printString("", 1, 6)
printString(">", 1, 7)
sleep(1)
printString("SET FILE/PROTECTION-OWNER:RWED ACCOUNTS.F", 2, 7)
printString("", 1, 8)
sleep(0.5)
printString(">", 1, 8)
sleep(1)
printString("SET HALT RESTART/MAINT", 2, 8)
printString("", 1, 9)
sleep (1.8)
printString("Initializing Robco Industries(TM) MF Boot Agent", 1, 10)
printString("RETRO BIOS", 1, 11)
printString("RBIOS-4.02.08.00 52EE5.E7.E8", 1, 12)
printString("Copyright 2201-2203 Robco Ind.", 1, 13)
printString("Uppermem: 64 KB", 1, 14)
printString("Root (5A8)", 1, 15)
printString("Maintenance Mode", 1, 16)
printString("", 1, 17)
printString(">", 1, 18)
sleep (1)
printString("RUN DEBUG/ACCOUNTS.F\n", 2, 18)
sleep(0.5)
term.clear()
printString("ROBCO INDUSTRIES (TM) TERMLINK PROTOCOL",1,1)
sleep(1)
printString("Maintenance Terminal", 1, 2)
sleep(1)
printString("Emergency Lights", 1, 3)
printString("1:Turn on", 3, 4)
printString("2:Turn off", 3, 5)
term.setCursorPos(1, 6)
input = read()
if input == "1" then
redstone.setOutput("bottom", true)
printString("Emergency Lights are Powering On", 1, 7)
sleep(1)
term.clear()
os.reboot()
if input == "2" then
redstone.setOutput("bottom", false)
printString("Emergency Lights are Powering Off", 1, 7)
sleep(1)
term.clear()
os.reboot()
else
printString("Please enter a valid input", 1,7)
sleep(5)
term.clear()
os.reboot()
end
end
I'm fairly new into ComputerCraft and I wanted to get more into it, but I'm stuck on this one. Could anyone help me out with this?
Spoiler
term.setCursorBlink( true )term.clear()
term.setCursorPos( 1, 1 )
printString("WELCOME TO ROBCO INDUSTRIES (TM) TERMLINK", 1, 1)
printString("", 1, 2)
printString(">", 1, 3)
sleep(1)
printString("SET TERMINAL/INQUIRE", 2, 3)
printString("", 1, 4)
sleep(1)
printString("RIT-V300", 1, 5)
printString("", 1, 6)
printString(">", 1, 7)
sleep(1)
printString("SET FILE/PROTECTION-OWNER:RWED ACCOUNTS.F", 2, 7)
printString("", 1, 8)
sleep(0.5)
printString(">", 1, 8)
sleep(1)
printString("SET HALT RESTART/MAINT", 2, 8)
printString("", 1, 9)
sleep (1.8)
printString("Initializing Robco Industries(TM) MF Boot Agent", 1, 10)
printString("RETRO BIOS", 1, 11)
printString("RBIOS-4.02.08.00 52EE5.E7.E8", 1, 12)
printString("Copyright 2201-2203 Robco Ind.", 1, 13)
printString("Uppermem: 64 KB", 1, 14)
printString("Root (5A8)", 1, 15)
printString("Maintenance Mode", 1, 16)
printString("", 1, 17)
printString(">", 1, 18)
sleep (1)
printString("RUN DEBUG/ACCOUNTS.F\n", 2, 18)
sleep(0.5)
term.clear()
printString("ROBCO INDUSTRIES (TM) TERMLINK PROTOCOL",1,1)
sleep(1)
printString("Maintenance Terminal", 1, 2)
sleep(1)
printString("Emergency Lights", 1, 3)
printString("1:Turn on", 3, 4)
printString("2:Turn off", 3, 5)
term.setCursorPos(1, 6)
input = read()
if input == "1" then
redstone.setOutput("bottom", true)
printString("Emergency Lights are Powering On", 1, 7)
sleep(1)
term.clear()
os.reboot()
if input == "2" then
redstone.setOutput("bottom", false)
printString("Emergency Lights are Powering Off", 1, 7)
sleep(1)
term.clear()
os.reboot()
else
printString("Please enter a valid input", 1,7)
sleep(5)
term.clear()
os.reboot()
end
end