Odd problem w/ CC and setting bundled cable output

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Neirin

New Member
Jul 29, 2019
590
0
0
Here's an odd one for you CC people:

I'm setting up a system that will change bundled cable outputs depending on a rednet message, but I'm running in to a little hiccup with rs.setBundledOutput. My plan was to have the rednet message send a variable to the program running on the receiving end that would be used to set the bundled cable output. I got everything working fine except the final step. After much frustration I broke down and made a couple of test programs.

My first program, just to make sure my idea works at all is:
Code:
x = 1
rs.setBundledOutput("back",x)
It does exactly what I want: it turns on the white cable that's connected via bundled cable to the back of the computer.

My second program - should be the same as the first, only x is determined by an argument (I tested by sending 1):
Code:
tArgs={...}
x=tArgs[1]
rs.setBundledOutput("back",x)
Instead of changing the redstone state it gives me the error "Expected string, number." I've tested that my argument actually gets written to x by using print(x), so I'm a little confused what my problem is.
 
Program arguments are passed as a string, so you must convert them to a number first.

Code:
x = tonumber(tArgs[1])
 
  • Like
Reactions: Neirin
Program arguments are passed as a string, so you must convert them to a number first.

Code:
x = tonumber(tArgs[1])
Already tried that - it gives the error "attempt to call nil value."

EDIT: blargh, I was using toNumber, not tonumber. Syntax errors...