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

Door lock redstone output question

Started by John Smith, 04 May 2014 - 03:32 PM
John Smith #1
Posted 04 May 2014 - 05:32 PM
Title says it all here is the code and the link from where I got


term.clear()
term.setCursorPos(1,1)

password = "cheese" Sets the password
debug
= "applesareyummm" Sets debugging password
write
("Enter your password: ")
input = read() Input the password

term
.clear() Clearing the terminal, and
term.setCursorPos(1,1) –…THEN setting the cursor position
if input == password then
print("Password Correct!") If the input is correct!
rs.setOutput("left",true) Change this and the setOutput to the side the door is on
sleep
(2) Pause for 2 seconds
rs.setOutput("left",false)
os.shutdown() Shut down the computer
elseif input
== debug then
exit() Exits the program
else
print("Password Incorrect!") If the input is incorrect! (Oh Noes!)
sleep(2)
os.shutdown() Shut down the computer
end Ends the 'if' block





the red is the part I need help with for some reason its not working yes I have the door on the left.

also REMEMBER I'm using CC (ComputerCraft) 1.6v Idk if the version even makes a difference.
Lyqyd #2
Posted 04 May 2014 - 07:43 PM
Are you playing on an MCPC+ server? Try setting the output and updating a block adjacent to the redstone while it is on, to see if it updates and shows that it is on.
John Smith #3
Posted 04 May 2014 - 09:47 PM
I dont know what a MCPC+ server is but yes i am plying on a server.
And that didnt work to. Maybe I did it wrong can you set an EX?
Bomb Bloke #4
Posted 04 May 2014 - 11:38 PM
What sort of door?

What if you just place redstone dust, does that light up?

If the server is using MCPC+, odds are you won't be able to get this to work.
Rougeminner #5
Posted 05 May 2014 - 12:01 AM
this is one of my best subjects. :D/>


password = "cheese" --Sets the password
debug = "applesareyummm" --Sets debugging password
write("Enter your password: ")
input = read() --Input the password
term.clear() --Clearing the terminal, and...
term.setCursorPos(1,1) --...THEN setting the cursor position
if input == password then
print("Password Correct!") --If the input is correct!
redstone.setOutput("left",true) --Change this and the setOutput to the side the door is on
sleep(2) --Pause for 2 seconds
redstone.setOutput("left",false)
os.shutdown() --Shut down the computer
elseif input == debug then
exit() --Exits the program
else
print("Password Incorrect!") --If the input is incorrect! (Oh Noes!)
sleep(2)
os.shutdown() --Shut down the computer

I have NEVER had any luck or progress using rs API my self.

I forgot to specify what i did. i just changed the rs.setOutput("left",true) to redstone.setOutput("left",true)

sorry

Rougeminner
HometownPotato #6
Posted 05 May 2014 - 12:03 AM
Are you sure the redstone is on the left relative to the computer? (not on the bottom or top left, just literally on the block to the left of the computer)?
And if so, are you sure nothing is changing its output other than the computer?
John Smith #7
Posted 05 May 2014 - 12:14 AM
Can someone tell me what MCPC+ is and no the redstone doesnt lightup Im usng an iron door CC 1.6

this is one of my best subjects. :D/>


password = "cheese" --Sets the password
debug = "applesareyummm" --Sets debugging password
write("Enter your password: ")
input = read() --Input the password
term.clear() --Clearing the terminal, and...
term.setCursorPos(1,1) --...THEN setting the cursor position
if input == password then
print("Password Correct!") --If the input is correct!
redstone.setOutput("left",true) --Change this and the setOutput to the side the door is on
sleep(2) --Pause for 2 seconds
redstone.setOutput("left",false)
os.shutdown() --Shut down the computer
elseif input == debug then
exit() --Exits the program
else
print("Password Incorrect!") --If the input is incorrect! (Oh Noes!)
sleep(2)
os.shutdown() --Shut down the computer

I have NEVER had any luck or progress using rs API my self.

I forgot to specify what i did. i just changed the rs.setOutput("left",true) to redstone.setOutput("left",true)

sorry



I will try that
Bomb Bloke #8
Posted 05 May 2014 - 12:23 AM
Loosely speaking, there are different ways to get MineCraft to load mods - MCPC+ is one of them, whereas Forge seems to be most common.

Catch is, while MCPC+ apparently offers some features you don't get with a straight Forge install, it causes a lot of mods to malfunction.

Long story short, ask the guy running the server if it uses it. If so, it's safe to assume that's your issue and that it doesn't look likely anything will be done about it.
John Smith #9
Posted 05 May 2014 - 12:37 AM
I did he said it isnt. Yet Rougeminner 's coding didnt help
Bomb Bloke #10
Posted 05 May 2014 - 12:44 AM
Ok. What if you put redstone dust on each of the four sides of the turtle? Does any of it light up when you put in the password?
John Smith #11
Posted 05 May 2014 - 04:21 AM
It turns out that the owner does have MCPC+.
Please close this topic