Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("top")
- if fs.exists("/reseau/config") == false then file = fs.open("reseau/config","w") file.write({server_id = os.computerID()}) file.close() end
- f1 = fs.open("/reseau/config","r") index = textutils.unserialise(f1.readAll()) f1.close()
- print(index["server_id"])
- while true do
- e = {rednet.receive()}
- print(textutils.serialise(e))
- if e[2] == "getID" then rednet.broadcast(index.server_id) end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement