Page 1 of 1

Trouble with Bohm event

Posted: Fri Aug 23, 2019 2:15 pm
by Kossatx
Hi! As Robotron already knows, I play a mod over POTZBLITZ MOD, the best mod ever made. Last night the game crashed when Bohm event was triggered. This is the error output:

Code: Select all

[23:25:22][12068]+++++++++++++++++++++++++ event:Bohm
[23:25:22][12068]Bohm
[23:25:22][12068]+++++++++++++++++++++++++ event:secret
[23:25:22][12068]Bohm
[23:25:22][12068]game/game_research.lua:804(global UpdateUnit) game/game_research.lua:804: attempt to index local 'unit' (a nil value)
And this is the file refered:

Code: Select all

function UpdateUnit(unit, techs)
--LogUi("update start")
  -- copy unit techs
  if techs == nil then
    unit.luaData.unitTechs = utils.deepcopy(unit.faction.luaData.factionTechs)
  else
    unit.luaData.unitTechs = utils.deepcopy(techs)
  end

  --FIXME: unit must use icon at time of purchase, not latest one
  -- If faction has the unit type
  if unit.faction.luaData.unitLevel[unit.prototype.name] ~= nil then
    while unit.level < unit.faction.luaData.unitLevel[unit.prototype.name] do
      unit:Upgrade()
      EasterEgg_RedBaron(unit)
    end
  end
 -- LogUi("update end")
end
Any idea about how to fix it?

Re: Trouble with Bohm event

Posted: Fri Aug 23, 2019 7:41 pm
by Robotron
You are lucky that the bug was not caused by your own modding or else I might not be able to help.

Thanks for reporting nonetheless.

Check the PotzBlitz thread for the update.

Re: Trouble with Bohm event

Posted: Fri Aug 23, 2019 7:52 pm
by Kossatx
I'm lucky 8)