Posted 23 February 2014 - 10:23 AM
Hello. I am working on a rednet relaying server for my new minecraft house and I am getting an error.
Here's my code, more explained later in the post:
A rednet message is sent into the server with something like this:
"10,command"
ID,CMD
I get the error:
rednet:39: Expected number
But there's a print straight after it, and when I comment out the send function, the print says:
Here's my code, more explained later in the post:
local req_id, req_message = rednet.receive(5);
if (req_message ~= nil) then
where,cmd = req_message:match("([^,]+),([^,]+)");
rednet.send(where, cmd, true);
A rednet message is sent into the server with something like this:
"10,command"
ID,CMD
I get the error:
rednet:39: Expected number
But there's a print straight after it, and when I comment out the send function, the print says:
print("Sent " .. cmd .. " to " .. where);
100% correctly, with the ID as it should be, and the command.