Game crashes to desktop during loop
Code: Select all
if ammo.valid_for_read then ammo.drain_ammo(1) end.
code flow ->
entity-with-trigger-event (line:244)
find closest player with ammo and run function if found (line:149)
drain ammo spawn small poison clouds (line:129)
load the save with the mod, shoot into a group of trees (might have to shoot more then once, ammo is used at a rate of 1 per tree in range)
After adding ammo.valid checks before the ammo.valid_for_read checks in all the right places the crashes
Expected Outcome: No crash