hey guys, I have a little problem with Factorio MP, I read the string/sentence "game.player" not found on MP version and I use that for "5Dim's Trains". What sentence I should use instead of "game.player"?
Thanks you all
MP problems
Re: MP problems
You can use game.players[1] for testing.
But that means only the first player can use your mod. A better solution is to use the playerindex on events.
But that means only the first player can use your mod. A better solution is to use the playerindex on events.
Code: Select all
game.onevent(defines.events.onguiclick, function(event)
local player = game.players[event.element.playerindex]
player.print("Hello world")
end