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

howto shorten rs.bundledoutput(string, #) ?

Started by Andale, 31 January 2013 - 05:55 AM
Andale #1
Posted 31 January 2013 - 06:55 AM
I thought this would work, but I've not been able to figure this out.


local rbo = function(text)
rs.setBundledOutput(text, x)
end

It seems really simple but I'm not sure why it won't take the second variable from rbo=("left", 4)
Returns 'Expected string, number'

I'm sure its super simple but I've not found anyone else's program that didn't just have it typed out. I've gotta shorten it at least to reduce time/size. I've got 5 bundled outputs going.
Engineer #2
Posted 31 January 2013 - 06:59 AM
try

rs.setBundledOutput(text, tonumber(x))
PixelToast #3
Posted 31 January 2013 - 07:12 AM
better:

rbo=rs.setBundledOutput
Andale #4
Posted 31 January 2013 - 07:39 AM
better:

rbo=rs.setBundledOutput

Oh my god. I had no idea you could just use variables in place of commands. Well, I'll be buggered. Thanks much.