ReikaKalseki / Reika_FactorioMods_Issues

The issue tracker for all of my Factorio mods - EndgameCombat, NauvisDay, Geothermal, Oreverhaul, and the rest.
5 stars 1 forks source link

Endgame Combat crash on load with RenaiTransportation #307

Open shadoxxhd opened 3 years ago

shadoxxhd commented 3 years ago

Failed to load mods: EndgameCombat/data-updates.lua:6: EndgameCombat/functions.lua:402: attempt to perform arithmetic on local 'num' (a string value)

The Modify_Power function (called in overrides.lua:100, defined in functions.lua:398) expects the unit part of the power string to be 2 characters long, but in RT the ghost locomotive has a max_power of "1J" -> string.sub(pow,1,-3) =="" -> not a number. Looking for the first non-numeric (0-9.+-) character instead of using fixed offsets shouldn't affect load time measurably.