Posted 15 March 2016 - 09:19 PM
I'm attempting to send a message via rednet to a computer but it keeps give me an error (Number expected) because I'm trying to grab the id of the computer off a different file.
Code:
The id file:
For the sending:
Code:
The id file:
53
1
Above isn't meant to be ran it's just there to hold computer information, in this case 53 is the computer id and 1 is the id of the thing I'm making.For the sending:
rednet.open("top")
local h = fs.open("id","r")
local j = h.readLine(1)
local j1 = h.readLine(2)
rednet.send(j,"HI!","send"..j1)
The "j" part is the part that is bugging out, is there anyway to send it as a number? Like this works with messages but not computer ids, how would I make it work with computer ids?