Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function main()
- peripheral.find("modem", rednet.open)
- local id, filename, id2, cont
- --io.stdout:write("waiting..")
- id, filename = rednet.receive("scp")
- io.stdout:write("Recieving '" .. filename .. "' from ID " .. id)
- io.output(filename)
- while true do
- io.stdout:write(".")
- id2, cont = rednet.receive("scp", 1)
- if id2 then
- if id ~= id2 then
- error("message from other ID interjected")
- end
- break
- end
- end
- io.write(cont)
- print("\ndone!")
- end -- main()
- print("scpd is running, press Ctrl+T to terminate")
- while true do
- main()
- end
Add Comment
Please, Sign In to add comment