This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
mustbuildhouse's profile picture

Program Error

Started by mustbuildhouse, 19 January 2013 - 10:47 AM
mustbuildhouse #1
Posted 19 January 2013 - 11:47 AM
I thought this was right but it says error on line :25: '=' expected. here's the code…help:


os.pullEvent = os.pullEventRaw
print ("Welcome to the Power Corp. Control system.")
print ("Please enter security key:")

write ("")
password = io.read()

if password == "hiitsme123" then

term.clear()

print ("Welcome, what would you like to do.")
print ("1. Start Diamond Generator")

write ("")
idk = io.read()

if idk == "Start Diamond Generator" then

redstone.setOutput ("top", true )
print ("Diamond Generator Powering on.")

os.shutdown

else

os.shutdown
end
Lyqyd #2
Posted 19 January 2013 - 11:55 AM
Change os.shutdown to os.shutdown() for both instances of it.
Cassine #3
Posted 19 January 2013 - 12:20 PM
The os.shutdown needs to be changed to os.shutdown() both times
Code Now
Spoiler

os.pullEvent = os.pullEventRaw
print ("Welcome to the Power Corp. Control system.")
print ("Please enter security key:")
write ("")
password = io.read()
if password == "hiitsme123" then
term.clear()
print ("Welcome, what would you like to do.")
print ("1. Start Diamond Generator")
write ("")
idk = io.read()
if idk == "Start Diamond Generator" then
redstone.setOutput ("top", true )
print ("Diamond Generator Powering on.")
os.shutdown()
else
os.shutdown()
end
mibac138 #4
Posted 19 January 2013 - 12:24 PM
This already writed Lyqyd…