My modlist is9.781 Loading mod bobpower 0.16.4 (data-updates.lua)
9.783 Script @__boblibrary__/technology-functions.lua:152: Technology bob-boiler-2 does not exist.
9.783 Script @__boblibrary__/technology-functions.lua:152: Technology bob-boiler-2 does not exist.
9.783 Script @__boblibrary__/technology-functions.lua:152: Technology bob-boiler-3 does not exist.
9.785 Script @__boblibrary__/technology-functions.lua:152: Technology steam-engine-generator-2 does not exist.
9.785 Script @__boblibrary__/technology-functions.lua:152: Technology steam-engine-generator-2 does not exist.
9.785 Script @__boblibrary__/technology-functions.lua:152: Technology steam-engine-generator-2 does not exist.
9.785 Script @__boblibrary__/technology-functions.lua:152: Technology steam-engine-generator-3 does not exist.
9.785 Script @__boblibrary__/technology-functions.lua:152: Technology steam-engine-generator-3 does not exist.
9.786 Error ModManager.cpp:1024: Failed to load mod "bobpower": __bobpower__/data-updates.lua:8: __boblibrary__/item-functions.lua:47: attempt to compare number with string
[0.16.42] bob_power bug after latest update
Moderator: bobingabout
[0.16.42] bob_power bug after latest update
Just updated my mods and got
My Mod list: Necormant co-author
Re: [0.16.42] bob_power bug after latest update
I'll re-post this from here
gnemonix wrote:A recent update of Nanobots (2.0.5) seemed to break BobPower.
Without Nanobots or with an older version (2.02) the game loads just fine.
Investigation discovered the culprit to be these:
bobpower/prototypes/fluid-generator-updates.luaCode: Select all
if data.raw.item["steel-pipe"] then bobmods.lib.recipe.add_ingredient("fluid-generator-2", "normal", {"steel-pipe", 5}) end
With the BobLibrary function defined as this:Code: Select all
if data.raw.item["titanium-pipe"] then bobmods.lib.recipe.add_ingredient("fluid-generator-3", "normal", {"titanium-pipe", 5}) end
boblibrary/recipe-functions.luaThe library function is defined with 2 parameters while the code calling it is using 3 parameters.Code: Select all
function bobmods.lib.recipe.add_ingredient(recipe, item)
Due to the "normal" parameter in the middle, I noticed that there is a different function that might have been intended: add_difficulty_ingredient() which does have 3 parameters.
To get my game working for now I removed the "normal" parameter in the problem lines like so:Code: Select all
if data.raw.item["steel-pipe"] then bobmods.lib.recipe.add_ingredient("fluid-generator-2", {"steel-pipe", 5}) end
However, which is inteded? add_ingredient() or add_difficulty_ingredient()Code: Select all
if data.raw.item["titanium-pipe"] then bobmods.lib.recipe.add_ingredient("fluid-generator-3", {"titanium-pipe", 5}) end
Re: [0.16.42] bob_power bug after latest update
The actual trigger was not bob_power but the nanobots update beyond 2.0.2 - this broke bob's code. (https://mods.factorio.com/mod/Nanobots/discussion)
Reversing the nano_bots version solved the current problem.
Reversing the nano_bots version solved the current problem.
My Mod list: Necormant co-author
Re: [0.16.42] bob_power bug after latest update
It's not Nanobots itself so much as a major bump in STDLIB that potentially broke it. However, the API calls for boblibrary are still inconsistent and need to be addressed.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: [0.16.42] bob_power bug after latest update
It's bob's fault. he needs to fix Power mod.
Re: [0.16.42] bob_power bug after latest update
Actually was a mixture of Bobs and Nexela's fault
Bob was using the wrong function so the parameters were not what was expected. In normal cases this didn't error it just logged.
Nexela then made an stdlib update that had a changed pushed to the wrong repo that changed the way strings behaved. which now caused caused bobs function to return a non number value (instead of nil) causing things to go boom.
Bob was using the wrong function so the parameters were not what was expected. In normal cases this didn't error it just logged.
Nexela then made an stdlib update that had a changed pushed to the wrong repo that changed the way strings behaved. which now caused caused bobs function to return a non number value (instead of nil) causing things to go boom.
Re: [0.16.42] bob_power bug after latest update
Here's to never needing error handling, ay Bob?
Seems like a fairly simple fix though.
Seems like a fairly simple fix though.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: [0.16.42] bob_power bug after latest update
if you have recomendations to make that function in my library more robust, I'm open to sugestions.
Re: [0.16.42] bob_power bug after latest update
I didn't follow the full logic of the function put it it is meant to only take a table then doing an if not type(input) == table then return log('blah") end at the top of the function will helpbobingabout wrote:if you have recomendations to make that function in my library more robust, I'm open to sugestions.
Other than that your function was working correctly just the string change broke it. So fixing it so bob-power calls the correct function would be the best first step
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: [0.16.42] bob_power bug after latest update
So, add a check in bobmods.lib.item.basic_item to make sure input variable is actually a table.Nexela wrote:I didn't follow the full logic of the function put it it is meant to only take a table then doing an if not type(input) == table then return log('blah") end at the top of the function will helpbobingabout wrote:if you have recomendations to make that function in my library more robust, I'm open to sugestions.
Other than that your function was working correctly just the string change broke it.
I already did this bit.Nexela wrote:So fixing it so bob-power calls the correct function would be the best first step