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

New to computercraft need help with a simple code.

Started by Kralnu, 21 March 2015 - 10:59 AM
Kralnu #1
Posted 21 March 2015 - 11:59 AM
hi there i was wondering if anyone could help me with this code. i have looked over it a lot and cant seem to get it to work.
i keep on getting the error message
door:6: Expected string, Boolean
Not sure what this mean as i said i am extremely new to computercraft

cheers

here is a pastebin to the code

http://pastebin.com/aTxiF4TX

thanks again

p.s if people could point me in the direction of a good text based tutorial on computer craft that would be awesome aswell

cheers
Veritas025 #2
Posted 21 March 2015 - 05:19 PM
I edited it a little and this worked for me

http://pastebin.com/ncd0uAb2
HPWebcamAble #3
Posted 21 March 2015 - 05:33 PM
Well, this is line 6:

rs.setOutput('right', true)

That should work, so I don't know what the problem is. I ran it (in an emulator) and it worked

What are you inputting for the password?
And are you sure that the pastebin has the exact code that you are running?

Also, on line 5:

if password == ('N') then
Usually this would be written without the parenthesis, but it works either way.