Page 1 of 1

Fails to load 0.17.2 of Bob's Functions Library mod

Posted: Fri May 31, 2019 7:19 am
by pmc666
I'm getting this error:
Failed to load modes: __boblibrary__/resource-generator.lua:503 attempt to index field '?' (a nil value)
stack traceback:
__boblibrary__/resource-generator.lua:503 in function 'finalise_resource_autoplace'
__boblibrary__/data-updates.lua:1 in main chunk

Re: Fails to load 0.17.2 of Bob's Functions Library mod

Posted: Fri May 31, 2019 1:02 pm
by bobingabout
Well, I tested it before release, and again just now. I'm not getting any odd errors like that.

I'm going to need more than just the error message on this one.

Line 1 of data-updates calls function resource_generator.finalise_resource_autoplace(), this completes the autoplace generation.

Line 503 is this:

Code: Select all

      data.raw.resource[name].autoplace = resource_autoplace_settings(resource)
This reads the table generated during the data stage when mods call function resource_generator.setup_resource_autoplace_data(name, params), which Library does 6 times (for base game ores) so it shouldn't be an issue that there's no data.

Which brings me to my only other conclusion, some other mod is calling that function incorrectly and breaking the data. (most likely passing an invalid name, but who would have had time to even write a mod to use it? It's possible someone else has a similar function on another table with the same name?)

Either way, list your mods and I'll look into it.

Re: Fails to load 0.17.2 of Bob's Functions Library mod

Posted: Fri May 31, 2019 4:02 pm
by pmc666
bobingabout wrote:
Fri May 31, 2019 1:02 pm
Well, I tested it before release, and again just now. I'm not getting any odd errors like that.

I'm going to need more than just the error message on this one.

...

Either way, list your mods and I'll look into it.
I've had a play with the Mods and I can reproduce it with just these enabled:

Bob's Functions (0.17.2)
Angel's Refining (0.10.9)
Base Mod (0.17.45)

Factorio Version is 0.17.45 and this is being played via Steam on W10 machine.

Re: Fails to load 0.17.2 of Bob's Functions Library mod

Posted: Fri May 31, 2019 5:49 pm
by bobingabout
pmc666 wrote:
Fri May 31, 2019 4:02 pm

Bob's Functions (0.17.2)
Angel's Refining (0.10.9)
Base Mod (0.17.45)

Factorio Version is 0.17.45 and this is being played via Steam on W10 machine.
Ah, right, best wait until angel updates his mod, he's working on it. I'm not sure why it's crashing, but I do have an idea of something that might fix it.

Re: Fails to load 0.17.2 of Bob's Functions Library mod

Posted: Fri May 31, 2019 7:11 pm
by pmc666
bobingabout wrote:
Fri May 31, 2019 5:49 pm
Ah, right, best wait until angel updates his mod, he's working on it. I'm not sure why it's crashing, but I do have an idea of something that might fix it.
No worries - I thought I'd let you know ASAP as it was about 2hrs old when I downloaded it.

Your mods are much appreciated BTW - really enrich and extend the game.

Re: Fails to load 0.17.2 of Bob's Functions Library mod

Posted: Fri May 31, 2019 8:18 pm
by bobingabout
pmc666 wrote:
Fri May 31, 2019 7:11 pm
bobingabout wrote:
Fri May 31, 2019 5:49 pm
Ah, right, best wait until angel updates his mod, he's working on it. I'm not sure why it's crashing, but I do have an idea of something that might fix it.
No worries - I thought I'd let you know ASAP as it was about 2hrs old when I downloaded it.

Your mods are much appreciated BTW - really enrich and extend the game.
You're welcome.

I released a small update, see if that makes any difference.

Re: Fails to load 0.17.2 of Bob's Functions Library mod

Posted: Sat Jun 01, 2019 7:44 am
by pmc666
bobingabout wrote:
Fri May 31, 2019 8:18 pm
You're welcome.

I released a small update, see if that makes any difference.
Thanks for that - it works perfectly now. Awesome.