game.forces.player stopped working. I didnt notice any changes to in changelog but game.forces.player throws error "attempt to index global 'game' (a nil value)" :/
game.players throws the same error :/
Any changes to game.forces etc?
Re: Any changes to game.forces etc?
Re: Version 0.12.11 - https://forums.factorio.com/forum/vie ... 87#p113069
EDIT: oops, didn't see it was actually you who posted in that threadkovarex wrote:This is probably in the on_load method. And yes, this was exactly the goal, to disable the access to the game object in this event. There is no good reason for it, and it brings only possible toruble.oLaudix wrote:Any idea why stuff likesuddenly throws error that 'game' is nil value after the update? Its the only thing that breaks my mods now and I don't really know why.Code: Select all
for i,p in ipairs(game.players) do
If you want to do some migration, you can use the event on_configuration_changed