Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Open rednet on the modem side (adjust "left" as needed)
- rednet.open("top")
- print("Waiting for coordinate broadcasts...")
- while true do
- local senderID, message, protocol = rednet.receive("coordBroadcast")
- if message and message.x and message.y and message.z then
- print("Received coordinates from computer " .. senderID .. ":")
- print("X: " .. message.x .. ", Y: " .. message.y .. ", Z: " .. message.z)
- -- Add any further processing of the coordinates here
- else
- print("Received invalid data from computer " .. senderID)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement