Jump to content




Simple bundled command?


  • You cannot reply to this topic
4 replies to this topic

#1 Zamithal

  • Members
  • 28 posts

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!"

#2 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 26 December 2012 - 12:41 PM

Try
if redstone.testBundledInput("bottom", colours.red) then
   print("YES!")
else
   print("NO!")
end


#3 Zamithal

  • Members
  • 28 posts

Posted 26 December 2012 - 12:43 PM

That works, thank you, I don't know why the other one doesn't return true though :/

#4 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 26 December 2012 - 12:47 PM

Check out the redstone API on the wiki. Read the descriptions :)

redstone.getBundledInput() only has one parameter

#5 ChunLing

  • Members
  • 2,027 posts

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.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users