So, I was modding. I just rewritten some of my mod's code. I tried to launch Factorio to see if I didn't miss anything and then Factorio crashed on about 25% through loading.
Mod: https://www.dropbox.com/s/afeh61bmattht ... 4.zip?dl=1
[0.12.29][Oxyd] Crash on load while modding
[0.12.29][Oxyd] Crash on load while modding
- Attachments
-
- factorio-current.log
- (3.54 KiB) Downloaded 117 times
Re: [0.12.29][Oxyd] Crash on load while modding
Well, I made it so that in 0.12.30, Factorio will exit with an error instead of crashing.
The problem is in your furnace_module_slots definition:
You defined furnace_module_slots to be a function, but it needs to be an integer.
You could possibly define another helper function, and have
The problem is in your furnace_module_slots definition:
Code: Select all
furnace_module_slots = function()
if tier <= 2 then
return 2
else
return 3
end
end,
You could possibly define another helper function, and have
Code: Select all
function furnace_module_slots_for_tier(tier)
if tier <= 2 then
return 2
else
return 3
end
end
function get_modifiers_for_tier(tier)
return
{
…,
furnace_module_slots = furnace_module_slots_for_tier(tier)
}
end
Re: [0.12.29][Oxyd] Crash on load while modding
Ohh, so it returns a function itself, and not the value that the function returns...Oxyd wrote:You defined furnace_module_slots to be a function, but it needs to be an integer.
So, instead of defining the furnace_module slots like this:
Code: Select all
module_specification =
{
module_slots = mods.furnace_module_slots,
},
Code: Select all
module_specification =
{
module_slots = mods.furnace_module_slots(),
},
EDIT: Well, it seems to work...