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

Need help with a function

Started by Steelerman82, 07 July 2013 - 12:43 PM
Steelerman82 #1
Posted 07 July 2013 - 02:43 PM
I bet this is a simple fix that I can't figure out. I'm trying hard to learn, but getting nowhere with idle experimentation. Here is the pastebin for the whole code: http://pastebin.com/QGJLjbH7.
It is meant to be a touchscreen button array of 11 buttons. when I click the certain button, it toggles the button to green, and turns on a redstone signal for a particular color of insulated cable from a bundled cable on the back of the computer. This is for a mob farm/soul shards set up. It uses the Direwolf20 Button API If you need to see it: www.pastebin.com/Ctqw7mc7.

The trouble I am having is the function that is triggered with the button being activated. The button Toggles, but I cannot get it to turn on the redstone.

The lines in particular are:

function test1()
button.toggleButton("Test1")
rs.setBundledOutput("back",2048)
print("Test1")
end

Am I typing this function wrong? FYI I did not write any of this code, only modified to add more buttons, and such. This will be the first line of code I have added that wasn't there before.


Help?
Lyqyd #2
Posted 07 July 2013 - 03:23 PM
Split into new topic.
Symmetryc #3
Posted 07 July 2013 - 08:36 PM
I don't quite understand…are you using RedPower2 Bundled Cables or RedPower insulated cable that going into bundled cable? If you're using latter, then you should probably use redstone.setOutput rather than redstone.setBundledOutput because IIRC, insulated cable connects and is powered by vanilla redstone.