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

bios:14: [string "startup"]:13: '}' expected

Started by Pancake_Mage, 30 December 2015 - 02:30 AM
Pancake_Mage #1
Posted 30 December 2015 - 03:30 AM
So I just started trying to learn about CC and I tried to write a startup program, I copied all of the code from a tutorial i found on a website, but when i tried to run it, it responded with:
bios:14: [string "startup":13: '}' expected

I don't know what happened, i did everything it said to do, i typed; edit startup, then typed in the code below, but it didn't work, help?





local side = "back"
local password = "password"
local opentime = 2
term.clear()
term.setCursorPos(1,1)
write("Password: ")
local input = read("*")
if input == password then
  term.clear()
  term.setCursorPos(1,1)
  print("Password correct!")
  rs.setOutput(side,true)
  sleep(opentime)
  rs.setOutput(side,false)
else
  print("Password incorrect!")
  sleep(2)
end
end

Cheers,
Pancake_Mage
Bomb Bloke #2
Posted 30 December 2015 - 04:22 AM
If you go back and edit the script saved on your computer again, and check around the 13th line, I reckon you may find you've typed a "{" where you meant to type a "(".