Page 1 of 1

[2.0.8] on_entity_logistic_slot_changed fired with nil event on game start/load

Posted: Tue Oct 22, 2024 1:02 pm
by sparr

Code: Select all

script.on_event(defines.events.on_entity_logistic_slot_changed, function(event)
  game.player.print(event)
end)
In hindsight, I realize that `game.player` was wrong here, but I think that's not relevant since I didn't let the event handler run to completion.

Running the game with the debugger and a breakpoint set on the middle line of the function, I saw the breakpoint trigger when loading a save. While at the breakpoint, the value of `event` was `nil`. I repeated this a few times. Then I started a new game and hit the breakpoint again. I did this a few times.

However, after I came here to post this and now that I go back to reproduce the failure again, I can no longer reproduce it. I don't know what changed.

Re: [2.0.8] on_entity_logistic_slot_changed fired with nil event on game start/load

Posted: Tue Oct 22, 2024 1:04 pm
by Rseding91
Thanks for the report however without a way to reproduce this I don't think there's anything we can do.