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

'end' expected?

Started by bobmarley123456, 19 January 2013 - 07:39 AM
bobmarley123456 #1
Posted 19 January 2013 - 08:39 AM
the computer says bios:206; [string "startup"]:45: 'end' expected (to close 'if' at line 14) when i use this code



x = yes
y = no
pullEvent =os.pullEventRaw
term.clear()
term.setCursorPos( 1,1)
print "========================="
print "BobMarleyCraftOS Beta 1.1"
print "========================="
print "Password: "
password = read()
pass = "poop"if password == (pass) then
sleep(2)
print("Welcome")
term.clear()
term.setCursorPos( 1,1 )
print "========================="
print "BobMarleyCraftOS Beta 1.1"
print "========================="
sleep(1)
print("View Programs")
input = read()
if input =="yes" then
print "-------------------"
print "Avaliable programs:"
print "-------------------"
sleep(1)
print "1.Meltdown"
sleep(1)
print "2.RPG Game"
sleep(1)
print "3.Rock Paper Scissors(RPS)"
sleep(1)
print "4.Other...."
else
print "Wrong Password"
sleep(1)
term.clear()
term.setCursorPos( 1,1 )
print "========================="
print "BobMarleyCraftOS Beta 1.1"
print "========================="
os.reboot()
end                             <-------------------line 45


Can anyone tell me whats wrong?
TheOddByte #2
Posted 19 January 2013 - 08:48 AM
Well why have you wroten pullEvent = os.pullEventRaw it is

os.pullEvent = os.pullEventRaw
And you should add another end at the bottom since you have 2 if's!

EDIT: 100th Post
bobmarley123456 #3
Posted 19 January 2013 - 09:12 AM
Thanks