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

Some errors with big reactors and ccraft on Direwolf20 1.2.1

Started by CaptainComeT, 28 April 2015 - 04:12 PM
CaptainComeT #1
Posted 28 April 2015 - 06:12 PM
I have some errors with ccraft on direwolf20 1.2.1.
I use direwolf20's program and i had error with turbine because i play on server and turbine on restart is stopping soo i added t.setActive(true) under peripheral.find soo i fixed that error but now i have errors in program.
When i start program everything works shows automatic and that thing but after some time it says:

reactor:568: attempt to compare nil with number
and when that shows i try to start program and it says :

reactor:10: Unable to access reactor - port is not connected
But everything is connected.
I fixed that error after breaking one wire to reactor and placing it again.
But still happens again soo first error than second after i try to start program.

Pastebins:

Button (i didn't change anything soo it is original
Reactor (original)
Reactor (Changed)
Bomb Bloke #2
Posted 29 April 2015 - 12:56 AM
The bug isn't related to the code, at least not directly; the problem is that the Reactor Computer Port block doesn't believe it's connected to a reactor. That's a BigReactors bug, and it really shouldn't be happening if you're standing right next to the reactor and manually starting the script…

A potential workaround might be to ensure that the entire reactor structure is chunk-loaded. If that doesn't sort it, try rebuilding the reactor such that the entire thing resides within a single chunk.
CaptainComeT #3
Posted 30 April 2015 - 08:23 AM
i moved it in one chunk but i still have this error after program finishes setting up :

reactor:568: attempt to compare nil with number
Bomb Bloke #4
Posted 30 April 2015 - 09:32 AM
Well, I suppose you could always try rigging the line to act like turbineRotorSpeed being nil is the same as it being 0. Odds are it'll reveal related errors, but hey, worth a shot.

if turbineRotorSpeed and turbineRotorSpeed > targetSpeed then  -- If turbineRotorSpeed is defined, and turbineRotorSpeed is more than targetSpeed, then...

The "if" statement's bright enough to stop trying to resolve the listed conditions as soon as it knows what the overall result will be, so in this case the "greater than" check only gets performed if turbineRotorSpeed is non-nil.
CaptainComeT #5
Posted 02 May 2015 - 08:45 AM
Thanks this helped but now there is second error (im not soo good in CCraft i know …)
reactor:311: Unable to access reactor - port is not connected
and than again :
reactor:10: Unable to access reactor - port is not connected
I placed my reactor in one whole chunk because it was in two chunks!
Computer is in chunk next to reactors chunk

I just noticed when i press Turbine button it stops program and says this error :
reactor:269: bad argument: double expected, got nil
Edited on 02 May 2015 - 07:07 AM
Bomb Bloke #6
Posted 02 May 2015 - 10:32 AM
Same as before, you're hitting those errors because the Reactor Computer Port block thinks it's not part of a reactor. It's possible, but unlikely, that moving the computer into the same chunk as the reactor would help.

Obviously, if you haven't already, you should check to see if BigReactors is fully up to date, and install the latest release if not.

Failing all that, all you can do is report it to the developer - be sure to include the details of your setup, when it triggers, and these steps you've taken to try to resolve the matter.