Jump to content




bundleAPI making RedPower bundle cables EASY!

api lua

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

#21 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 10 April 2013 - 08:25 PM

View Postimmibis, on 10 April 2013 - 08:23 PM, said:

@theoriginalbit: Since they were created.
I didn't think Eloraam had a 'strength' to it. I know it only lasted for 256 blocks, but I never knew there was a 'strength'

#22 immibis

    Lua God

  • Members
  • 1,033 posts
  • LocationWellington, New Zealand

Posted 11 April 2013 - 08:34 PM

Did you know vanilla redstone had a strength, from 0 to 15?

#23 Andrakon

  • Members
  • 37 posts

Posted 19 April 2013 - 08:41 PM

Well then... This was my first bit of programming so I am surprised it had as few bugs in it as it did! I haven't even thought look at this thread in a month! I do know there are some bugs with getting the input from certain sides. For instance listening for input on the bottom from a bundled cable is supposed to return a 0 or 1 but returns some large number instead. To compensate in my program using the api I just looked for one of the two huge numbers it returns and assumed it ment 1 or 0. Seems to be a Computer craft bug since the exact same command returns a 1 or 0 on the other sides..

Why does it use 1 or 0 instead of true or false? Because I built a calculator in vanilla minecraft before and think in terms of 0's and 1's instead of trues or falses XD


Oh... now i realize that huge number was all the other inputs and outputs I had on the bottom at the time... DERP!

Glad I am more experienced with this now!

#24 Andrakon

  • Members
  • 37 posts

Posted 19 April 2013 - 08:45 PM

View PostJaitt, on 10 April 2013 - 11:12 AM, said:

Hi,

I have also been experiencing problems with reading individual input colours. Through experimenting I found it will return the total summed value of all the inputs not the individual line. 1 or 0

I believe the problem is on line 206 of the API. You are using

redstone.getBundledInput(string side)

If you were to use

redstone.testBundledInput(string side, int color value)

Instead you will get the actual on or off of an individual line.. worked for me

Tks

Great tip! In one fell swoop you probably squashed the majority of problems people were having! TYVM! :D

Now version 1.2!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users