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

Simple bundled command?

Started by Zamithal, 26 December 2012 - 11:37 AM
Zamithal #1
Posted 26 December 2012 - 12:37 PM

if redstone.getBundledInput ("bottom", colors.red) == true then
  print("YES!")
else
  print("NO!")
end

This always returns no and I cannot figure out why, the red wire is on and I have a jacketed bundled cable running up to the bottom of my turtle…any ideas?

No error is returned, only "NO!"
remiX #2
Posted 26 December 2012 - 12:41 PM
Try
if redstone.testBundledInput("bottom", colours.red) then
   print("YES!")
else
   print("NO!")
end
Zamithal #3
Posted 26 December 2012 - 12:43 PM
That works, thank you, I don't know why the other one doesn't return true though :/
remiX #4
Posted 26 December 2012 - 12:47 PM
Check out the redstone API on the wiki. Read the descriptions :)/>

redstone.getBundledInput() only has one parameter
ChunLing #5
Posted 26 December 2012 - 02:33 PM
And, more significantly, it returns an integer number that will never be equal to the boolean value true.