This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
timohawk's profile picture

[Lua] [error] rednet:327: string expected

Started by timohawk, 28 December 2012 - 04:06 AM
timohawk #1
Posted 28 December 2012 - 05:06 AM
Hello there.

Previously I had been running my program "melons" to harvest melons from my farm and then drop them off. This was running fine without errors

From this I wanted all my turtles controlled by a central computer:

Turtle Code:

print("Waiting for commands...")
rednet.close()
  rednet.open()
senderID, mes, dis = rednet.receive()
if senderID==32 and mes=="start" then
  dofile(melons)
end

Computer Code:

rednet.close("top")
  rednet.open("top")
	rednet.broadcast("start")

The turtle prints then comes up with the error in the title.

Please Help Thanks in advance

EDIT: I am using the Tekkit modpack on a server,although I am the server owner.
OmegaVest #2
Posted 28 December 2012 - 05:17 AM
I think you need to designate a side for open. On a turtle, just use rednet.open("right").
timohawk #3
Posted 28 December 2012 - 05:24 AM
That doesn't appear to work.
Thanks for suggesting though.
Lyqyd #4
Posted 28 December 2012 - 06:40 AM
He's correct. If it's not right, try left. Either way, you need to specify the side that the modem is on. You did craft a modem on to it, right?
remiX #5
Posted 28 December 2012 - 07:00 AM
Wireless turtles usually have their modems on the right
timohawk #6
Posted 28 December 2012 - 07:02 AM
Ok, sorry about this. i derped and forgot that "right" has to be in quotation marks *faceplam*
timohawk #7
Posted 28 December 2012 - 07:04 AM
Ok, that errors gone but now the turtle wont carry out the program. No errors are shown.

EDIT: shell.run() doesnt work…
Lyqyd #8
Posted 28 December 2012 - 07:07 AM
You don't have melons in quotes either.
timohawk #9
Posted 28 December 2012 - 07:16 AM
Thanks everyone for your help, after fiddling about I got it to work.