Posted 17 January 2013 - 02:07 AM
Well, I have been trying to make a program to switch 2 bundled wires, but not simultaneously. I want the red one to switch for 5 seconds, then turn off automatically, and after, the same with tha blue one. I have tryied for hours, but allways tells me "bad argument: string expected, got nil".
Could someone help me?
My code:
A friend told me it should be like that, but i dont know why it doesn't work.
And for curious people who want to know what it will be for:
http://img94.imageshack.us/img94/7827/20130116034408.png
http://img834.imageshack.us/img834/9876/20130116034356.png
http://img96.imageshack.us/img96/4203/20130116034341.png
http://img809.imageshack.us/img809/8431/20130116034326.png
Can someone help me with my program pleas? I must first say that I am noob for this xD
Could someone help me?
My code:
Spoiler
while(true) do
redstone.setBundledOutput("back", colors.red)
sleep(5)
redstone.setBundledOutput(Side, 0)
redstone.setBundledOutput("back", colors.blue)
sleep(5)
redstone.setBundledOutput(Side, 0)
end
A friend told me it should be like that, but i dont know why it doesn't work.
And for curious people who want to know what it will be for:
Spoiler
I'm trying to do a frames door, that opens and closes automatically when I enter the program's name, and this is my design for the door at the moment:http://img94.imageshack.us/img94/7827/20130116034408.png
http://img834.imageshack.us/img834/9876/20130116034356.png
http://img96.imageshack.us/img96/4203/20130116034341.png
http://img809.imageshack.us/img809/8431/20130116034326.png
Can someone help me with my program pleas? I must first say that I am noob for this xD