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

[SOLVED][Error][Tekkit][Server]Rednet appears to be broken.

Started by Andybish, 29 August 2012 - 04:08 PM
Andybish #1
Posted 29 August 2012 - 06:08 PM
Playing on a Tekkit 3.1.2 multiplayer server, running ComputerCraft 1.33, I am trying to create a simple but effective wireless turtle control, using the following code, all written in the edit program built into the devices they are run on:

Turtle:
rednet.open("right")
id, message = rednet.receive()
if message == "intro" then
  if rednet.send(id, "Command:") == false then
	print("Error!")
  end
else
  if rednet.send(id, shell.run(message)) == false then
	print("Error!")
  end
end

Note: Same error occurs with or without spaces within if functions.

Computer:
(Modem already active)
if rednet.broadcast("intro") == false then
  print("Error!")
end
id, message = rednet.receive()
print(id, ": ", message)

I run the Turtle, then the Computer program, but the Computer will not send the message.
OmegaVest #2
Posted 29 August 2012 - 06:49 PM
So, few questions.

How far is the turtle from the computer?
Does the turtle have fuel? (Or did you disable that in the config?)
Do they actually send the message? You can make a variable from the call (ie. bool = rednet.send(2, "intro") print (bool)).
Following that, if it does send, does the other machine ever receive? Instead of having it print a specific line, have it try to print the message, and the sender. You will see if it is actually receiving anything.


If I think of other questions, I'll put them here (unless you respond, in which I will respond with them).
Andybish #3
Posted 29 August 2012 - 07:05 PM
1: Right next to it
2: Older version than fuel
3: Not sending, but no idea why.
Code edited to show sending errors, alterations reflected above.
OmegaVest #4
Posted 29 August 2012 - 08:37 PM
Okay, try broadcast. And if that fails, I'll be obliged to ask if there is a modem attached to the computer (since it doesn't come with one), and if there is, try sending it from another wireless turtle. I have no idea why that would work if nothing else does, but. . .
Andybish #5
Posted 29 August 2012 - 08:53 PM
*sigh* There is a modem. It is a wireless turtle. Sending from another wireless turtle isn't happening because I am playing legit, and I am not making another wireless turtle. I would try broadcast, but as I am running a server, while I was waiting for a reply, a creeper blew up my wireless turtle. I got it back, but the program was lost. It may take a while to restore it, then I will try broadcast.

EDIT: Broadcast failed.

Note: this is a Tekkit 3.1.2 server with ComputerCraft 1.33
Note: There is no setting in the server's mod_computercraft.cfg regarding rednet, so it is not disabled by the server, so I have no idea what is going on.
Andybish #6
Posted 29 August 2012 - 09:46 PM
Works after rebooting the server, thanks anyway.