Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args = {...}
- if not args[2] then
- error('Specify a modem!')
- end
- if not peripheral.wrap(args[2]) then
- error('Modem not found!')
- end
- if peripheral.getType(args[2]) ~= 'modem' then
- error('Peripheral is not a modem!')
- end
- if not args[1] then
- error('Please specify a file!')
- else
- local file = fs.open(args[1])
- rednet.open(args[2])
- rednet.send(19,file.readAll(),'print')
- rednet.close(args[2])
- file.close()
- end
Advertisement
Add Comment
Please, Sign In to add comment