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

Trying to debug an orphaned Program.

Started by apasco, 07 August 2013 - 05:26 PM
apasco #1
Posted 07 August 2013 - 07:26 PM
We had been using the 'drones' program written in this thread for the last few updates of FTB DW20 pack.
I went to use it on the current release and I'm getting the error of:
rednet:17: No Modem on left side
I looked at the code and went back to the thread to find its been abandoned and is up for new ownership.
The original coder has not logged in since december according to his profile and I am not fluent in lua to fix it myself.
Can anyone help me? From what I can tell though the code opens all possible rednet modems on the turtle.
We are running the 4.1 that is the version in the OP. Pastebin is http://pastebin.com/pdMZ17KV if it makes it easier.

Thank you,
Apasco
Lyqyd #2
Posted 07 August 2013 - 07:52 PM
Split into new topic.

You could either remove the lines that refer to sides you don't have modems on, or replace it with a loop that checks the sides and opens the correct one, like this:


for _, side in ipairs(rs.getSides()) do
  if peripheral.getType(side) == "modem" then
    rednet.open(side)
    break
  end
end
apasco #3
Posted 07 August 2013 - 09:43 PM
Testing the new code currently. It appears to be working. I'll edit this post when its finished of ir it throws an error. Thank you very much.
Turtles ran fine till the end and then threw error: rednet:31: No modem on left side.
The drones themselves threw the error with the main turtle continuing to run and collect the drones then after that it throws the same error. But I think using the code you gave me above and switching open to close should fix it.
So again Thank you!
Edited on 07 August 2013 - 08:05 PM