Posted 28 August 2014 - 09:40 AM
I have been looking around at what I can do with ComputerCraft and, so far, it seems to be bugging out. I messed around with it myself, got errors at every turn. I expected this, as I was just messing around trying to learn how to work this. Then I started getting serious. I went to some guides on how to do stuff to get actual working programs. I started off with trying to dial a Stargate from Lanteacraft, and it didn't seem to like the coding I got from the video I chose. I moved on to something a little more simple. Password protected doors. I tried using a youtube video as well, but it still wasn't working. I went around google for a while until I came across the wiki with it's own password protected door. I figured this can't possibly fail, but it did. In fact, it came up with the same error as the code for every other coding I've done in here. I doubt it is something wrong with the mod, but I've seen this issue too many times. I have taken code directly from people that clearly worked in videos and this still happens. I'm not sure what to think.
This is what I did to get the password protected door I am trying to do:
This is what I get when I try and run the code:
I probably didn't explain something very well or missed a detail in this post. Please just ask for whatever I may have missed or failed to explain well enough and I shall provide. It is almost 4am and I've been working on this for hours, so I'm a little frustrated and tired. :)/>
This is what I did to get the password protected door I am trying to do:
edit Lockdown
while true do
term.clear()
term.setCursorPos(1, 1)
print("Please Enter Password:")
input = read("*")
if input == "password" then
redstone.setOutput("back", true)
sleep(2)
redstone.setOutput("back", false)
end
end
This is what I get when I try and run the code:
/Lockdown:2: attempt to index global 'term' (a nil value)
stack traceback:
/Lockdown:2: in main chunk
(…tail calls…)
I probably didn't explain something very well or missed a detail in this post. Please just ask for whatever I may have missed or failed to explain well enough and I shall provide. It is almost 4am and I've been working on this for hours, so I'm a little frustrated and tired. :)/>