Jump to content




bios:14: [string ".temp]:6: 'then' expected


  • You cannot reply to this topic
2 replies to this topic

#1 braydenq6

  • Members
  • 13 posts

Posted 23 January 2016 - 03:38 AM

Im making a computer craft and projectred
elevator program thats password protected the code is

While true do
term.clear()
term.setCursorPos(1, 1)
print("Enter Password To Start Elevator")
input = read("x")
if input = "666" then
term.clear()
term.setTextColor(colors.lime)
term.setCursorPos(1, 1)
print("Elevator Started, Every Thing Running Properly")
side = "back"
if redstone.testBundledInput(side, colors.lime) == true
then
redstone.setBundledOutput(side, colors.green)
sleep(2)
end
if redstone.testBundledInput(side, colors.red) == true
then
redstone.setBundledOutput(side, colors.pink)
sleep(2)
end
if redstone.testBundledInput(side, colors.black) == true
then
redstone.setBundledOutput(side, 0)
end
sleep(1)
if redstone.testBundledInput(side, colors.grey)
then
print("Restarting System Now")
sleep(5)
end
sleep(1)
end

#2 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 23 January 2016 - 04:50 AM

Line 6:

if input = "666" then

Use = to assign variables, and == to compare them.

#3 braydenq6

  • Members
  • 13 posts

Posted 24 January 2016 - 05:56 AM

Thanks





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users