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

DireWolf20 Reactor Program crashing

Started by ThePureNerd, 21 November 2015 - 05:41 PM
ThePureNerd #1
Posted 21 November 2015 - 06:41 PM
I am using the direwolf20 reactor program on the direwolf20 pack (v1.6.1) on a server.

Whenever I run the program it comes up with "File not found", but runs the starting steps (calculating the control rod depth) well, until it crashes with the message "reactor:39: attempt to index ? (a nil value)

I have had this running well in the past, but have recently moved base. The programs (button and reactor) are both loaded onto a disk.

The programs can be found at pastebin.com/4qNyaPav for the reactor program and pastebin.com/XBbMUYNn for the button API.

Any advice on how to fix?
Edited by
Lyqyd #2
Posted 21 November 2015 - 06:51 PM
Moved to Ask a Pro.
Rougeminner #3
Posted 21 November 2015 - 08:16 PM
alrighty, lemme give it a try. well edit this port when i find something


EDIT SHORTLY AFTER ORIGINAL POST: yeah, i agree with Anavrins. i thought dire's button API was included in his mod pack, guess not, just down load it using pastern. if you have it make sure its not in another directory and that you have the name correct.
are you sure the button file is in the same folder than the reactor one?

i am going to imagine that buttons API is in the /rom/apis folder

so it would be os.loadAPI("/rom/apis/button") || if its in the root dir then ("/button")
Edited on 21 November 2015 - 07:36 PM
Anavrins #4
Posted 21 November 2015 - 08:25 PM
It means that the button variable is nil, which means the button api somehow did not load properly, are you sure the button file is in the same folder than the reactor one?
Bomb Bloke #5
Posted 21 November 2015 - 09:19 PM
os.loadAPI() takes absolute paths, not relative ones. The script is currently trying to load the button API from the root of the computer's drive. If the script/API are stored in a subfolder somewhere, you'd use shell.resolve() to get the file from the current working directory:

os.loadAPI( shell.resolve( "button" ) )