Posted 29 August 2012 - 05:44 AM
Hey peoples i would really love some help.
I am running the mod pack tekkit.
I am designing a factory with 4 different doors i wanted opened by computercraft.
I don't want to have 4 different computers, i just want one.
I looked into this before and found out that you can make the computer output to different coloured insulated alloy wire (RedPower Mod)
After trying to get this working I couldnt even get it to output to ANY wire, normal redstone or bundled cable.
This is what i tried to write,
I added some comments, not sure how they work in computer craft, so i did C# comments (the double //)
If someone can explain to me what i am doing wrong, that would be lovely. that or just emend the code for me.
I am sort of new to ComputerCraft, i tried some code in the past and got it working, but now cant.
Thanks in advance
ace223.
I am running the mod pack tekkit.
I am designing a factory with 4 different doors i wanted opened by computercraft.
I don't want to have 4 different computers, i just want one.
I looked into this before and found out that you can make the computer output to different coloured insulated alloy wire (RedPower Mod)
After trying to get this working I couldnt even get it to output to ANY wire, normal redstone or bundled cable.
This is what i tried to write,
room1 = "Sugar"
room2 = "Wheat"
room3 = "Cows"
room4 = "Chickens"
lightson = "Lights on"
lightsoff = "Lights oftf"
print "RAT Entry System v0.1"
write "Please Enter Room To Open"
input = read()
if input == room1 then
redstone.setBundledOutput("back", colour.red, true) //output to red bundled cable
write "Door To Sugar Open for 60 Seconds"
sleep (60)
redstone.setBundledOutput("back", colour.red, false)
os.shutdown()
elseif input == room2 then
redstone.setBundledOutput("back", colour.yellow, true) //output to yellow bundled cable
write "Door To Wheat Open for 60 Seconds"
sleep (60)
redstone.setBundledOutput("back", colour.yellow, false)
os.shutdown()
elseif input == room3 then
redstone.setBundledOutput("back", colour.white, true) //output to white bundled cable
write "Door To Cows Open for 60 Seconds"
sleep (60)
redstone.setBundledOutput("back", colour.white, false)
os.shutdown()
elseif input == room4 then
redstone.setBundledOutput("back", colour.blue, true) //output to blue bundled cable
write "Door To Chickens Open for 60 Seconds"
sleep (60)
redstone.setBundledOutput("back", colour.blue, false)
os.shutdown()
elseif input == lights then
redstone.setBundledOutput("back", colour.pink, true) //output to pink bundled cable
write "Door To Wheat Open for 60 Seconds"
sleep (60)
redstone.setBundledOutput("back", colour.pink, false)
os.shutdown()
else
write "Unknown Command Try Again"
input = read()
os.reboot
term.clear()
term.setCursorPos(1,1)
end
I added some comments, not sure how they work in computer craft, so i did C# comments (the double //)
If someone can explain to me what i am doing wrong, that would be lovely. that or just emend the code for me.
I am sort of new to ComputerCraft, i tried some code in the past and got it working, but now cant.
Thanks in advance
ace223.