Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Variables
- local COMPUTER_ID = 0
- local TURTLE_ID = os.getComputerID()
- rednet.open("right")
- while true do
- local senderID, receivedMessage = rednet.receive("gATM")
- if type(receivedMessage) ~= "table" then
- print("isTable FALSE")
- rednet.send(senderID, {"unsuccesful"}, "gATM")
- else
- if receivedMessage[1] == "request" then
- rednet.send(senderID, {"succesful"}, "gATM")
- else
- print("isCorrectMessagetype FALSE")
- rednet.send(senderID, {"unsuccesful"}, "gATM")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement