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

auto add host

Started by CaptRanger, 28 April 2014 - 05:45 PM
CaptRanger #1
Posted 28 April 2014 - 07:45 PM
in a startup file I am trying to add in a auto host add to the network..

rednet.host("net",os.computerID()) fails

using it as a local var fails as it is wants a string.


Any help would be great.

Brett
CometWolf #2
Posted 28 April 2014 - 08:40 PM
If a number won't work, you can just convert it to a string.

string.format(os.computerID())
CaptRanger #3
Posted 29 April 2014 - 04:24 PM
Nope didnt like that either.
Bomb Bloke #4
Posted 29 April 2014 - 04:27 PM
So you're saying you did this:

rednet.host("net",string.format(os.computerID()))

… and had no success?

In that case, did you get the same error, or did something else happen?
CaptRanger #5
Posted 29 April 2014 - 04:37 PM
sorry i didnt do string.format … So yes it did work… Thanks guys.