Jump to content




DireWolf20 Reactor Program crashing



4 replies to this topic

#1 ThePureNerd

  • New Members
  • 1 posts

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 Bomb Bloke, 21 November 2015 - 09:14 PM.
Fixed weird formatting.


#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 21 November 2015 - 06:51 PM

Moved to Ask a Pro.

#3 Rougeminner

  • Members
  • 151 posts

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.

View PostAnavrins, on 21 November 2015 - 08:25 PM, said:

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 by Rougeminner, 21 November 2015 - 08:36 PM.


#4 Anavrins

  • Members
  • 775 posts

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?

#5 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

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" ) )






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users