Posted 13 July 2012 - 04:57 PM
I'm attempting to make a factory, with a terminal that you can place orders to buy an item from in a server. I'm attempting to have one computer keep track of all the items, and once it gets a rednet message, it will send the items list to the computer wanting to buy. But I'm having trouble with io.open, and I haven't used rednet in a while so there may be mistakes with it.
This is the code for the purchasing terminal
And this is for the receiving terminal
This is the code for the purchasing terminal
rednet.open("top")
rednet.send(449, "getItems")
rednet.receive(10)
local file = (rednet_message)
io.open("items", "w+")
(file)
file:close
shell.run("purchase")
And this is for the receiving terminal
rednet.open("top")
rednet.receive()
if (rednet_message) = "getItems" then
local file = fs.open("items", "r")
rednet.send(418, (file))
end
os.reboot()