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

This noob (me) literally cant open a door.

Started by Cyberpro123, 15 February 2018 - 12:54 AM
Cyberpro123 #1
Posted 15 February 2018 - 01:54 AM
I'm playing CC1.75 and am trying to make a program that will send power to the grey bundled cable to the left of the computer, print "Door Unlocked, locking in 30s.", wait 30 seconds, then remove power and print "Door Locked". This is the best code I've been able to make.

redstone.setBundledOutput("left" colors.gray)
print("Door Unlocked, locking in 30 seconds.")
sleep(30)
print("Door Locked")
redstone.setBundledOutput("left" 0)
end
Whenever I run the program I get this in red:

bios:14: [string "HomeDoor"]:1: ')' expected
Bomb Bloke #2
Posted 15 February 2018 - 08:05 AM
Arguments you pass to a function must be separated by commas, not just spaces. The Lua interpreter gets to the "c" on your first line and gets confused.

redstone.setBundledOutput("left", colors.gray)
.
.
.
redstone.setBundledOutput("left", 0)