NPUtils_LITEv2

by MdRuz

so called completory, all in one, addition for those playing with big mods. Choose from these features: Belts, different purpose assemblers, furnaces, late game machinery, modules, trains, powerful lamp, inventory size, running speed, oil machines and oil power generation, seed growing, land water pump, optional 2x,3x ore chain. and much much more! all that, in one, sorted and separated tab.

2 years ago
1.1
768

g Crash while destroying turrets from enemy

1 year, 3 months ago
(updated 1 year, 3 months ago)

I've got a crash while destroying turrets from enemy:


Error while running event NPUtils_LITEv2::on_entity_damaged (ID 103)
Entity is not entity-with-health.
stack traceback:
[C]: in function 'damage'
NPUtils_LITEv2/control.lua:67: in function <NPUtils_LITEv2/control.lua:59>


Edit: not only the turrets - all items, if they have conatct with electric rampant.

After comment out the part in control.lua there is no crash anymore:

-- if attacker and target.force == game.forces['player'] and attacker.force == game.forces.enemy then
-- attacker.damage(damage_amount*damage_modifier,target.force,'electric')
-- end


1 year, 2 months ago

what other mod are you using? just tested on newest version of the game with only my mod enabled and all seems to be working

1 year, 2 months ago

test this out, replace line 66 with this, might upload if that works

if attacker and target.is_entity_with_health == true and target.force == game.forces['player'] and attacker.force == game.forces.enemy then

1 year, 2 months ago

Sorry, I am already in the advanced game, in which I have already wiped out all enemies. I can't test it until I start over again after nexus win ;)

New response