Jump to content




Bundled cables


4 replies to this topic

#1 PrinzJuliano

  • Members
  • 89 posts
  • LocationGermany

Posted 19 June 2012 - 02:17 PM

Hi
i want to know :
What's wrong with this code:
side = "left" -- edit able
local x = rs.getBundledOutput(side)
a = colors.combine(x, colors.blue)
rs.setBundledOutput(a)
HELP ME

#2 BigSHinyToys

  • Members
  • 1,001 posts

Posted 19 June 2012 - 02:22 PM

View PostPrinzJuliano, on 19 June 2012 - 02:17 PM, said:

Hi
i want to know :
What's wrong with this code:
side = "left" -- edit able
local x = rs.getBundledOutput(side)
a = colors.combine(x, colors.blue)
rs.setBundledOutput(side,a) -- this needs a side
HELP ME
fixed in the above

#3 Dirkus7

  • Members
  • 148 posts
  • Locationthe Netherlands

Posted 19 June 2012 - 03:51 PM

View PostBigSHinyToys, on 19 June 2012 - 02:22 PM, said:

View PostPrinzJuliano, on 19 June 2012 - 02:17 PM, said:

Hi
i want to know :
What's wrong with this code:
side = "left" -- edit able
local x = rs.getBundledOutput(side)
a = colors.combine(x, colors.blue)
rs.setBundledOutput(side,a) -- this needs a side
HELP ME
fixed in the above
Nope, getBundledOutput? should be rs.getBundledInput(side)
side = "left" -- edit able
local x = rs.getBundledInput(side)--we want the input, not the output
a = colors.combine(x, colors.blue)
rs.setBundledOutput(side,a) -- this needs a side


#4 BigSHinyToys

  • Members
  • 1,001 posts

Posted 19 June 2012 - 04:38 PM

why would he want to do that rs.getBundledOutput is used to see witch colors you are outputting on. then he adds a new color to that and updates the output vars. This program is not for Input.

Quote

Functions in the Redstone API:
redstone.getInput( side )
redstone.setOutput( side, boolean )
redstone.getOutput( side )
redstone.getSides( )

Functions in the Redstone API for working with RedPower bundled cables:
redstone.getBundledInput( side )
redstone.testBundledInput( side, color )
redstone.setBundledOutput( side, colors )
redstone.getBundledOutput( side )

Type "help redpower" for usage examples.


#5 PrinzJuliano

  • Members
  • 89 posts
  • LocationGermany

Posted 19 June 2012 - 07:33 PM

Thanks,
I will make a video about this l8er....
but thanks





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users