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

Is there a way I can get the label of a computer connected to a network?

Started by cntkillme, 15 May 2017 - 05:47 AM
cntkillme #1
Posted 15 May 2017 - 07:47 AM
I'm wondering if it's possible to get the label of some computer connected to a wired network.
I know I can get a handle to it using peripheral.wrap but I don't think I can get the label from there.

My current solution is to have one computer just ask the other computer what its label is.


Also, another unrelated question: I read that if you label your computer, destroy it, recreate one, and set the label to what it was previously all the data would be saved. Is there a way to disable this since it sort of ruins multiplayer for me?
Lyqyd #2
Posted 15 May 2017 - 03:33 PM
You'd have to ask the computer for its label via rednet, and it would need software to handle replying to the request.

That's not how labels work. If you break a computer with a label and place the labeled computer again, the data (and fuel level, in turtles) will be retained. If you break a labeled computer and toss the item in lava (for example), you won't be able to get to the data on it in-game unless you can use command blocks. The server's world save will still contain all of the data that was on it.
cntkillme #3
Posted 17 May 2017 - 12:01 AM
Oh alright thanks for clearing that up.