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

I Have No Idea Why This Isn't Working

Started by TheZipCreator, 27 November 2016 - 02:55 PM
TheZipCreator #1
Posted 27 November 2016 - 03:55 PM
So, I Have A Piece Of Code And It Gives me the Error
bios:14: [string ".temp" ];3; '<eof>' expected
Here's The Code:
if fs.exists("main") then
os.run("main")
end else
term.setBackgroundColor( colors.gray )
term.clear()
print("Cant Find OS, Please Re-Install")
wait(5)
os.reboot()
end
Bomb Bloke #2
Posted 27 November 2016 - 11:54 PM
Aw, not another OS… It got old a long time ago.

Anyway, you can't "else" an "if" block you've already "end"ed.

http://lua-users.org/wiki/ControlStructureTutorial