I've got a report with the below error in MP. This was also reported back in 0.12, so not new to 0.13.
Code: Select all
10714.937 Error MultiplayerManager.cpp:129: MultiplayerManager failed: "Error while running the event handler: __Natural_Evolution_Enemies__/control.lua:201: attempt to index field 'character' (a nil value)"
Code: Select all
for i = 1, #game.players, 1 do
player = game.players[i]
if player.connected and player.character.valid then
player.surface.set_multi_command{command = {type=defines.command.attack, target=player.character, distraction=defines.distraction.by_enemy},unit_count = (20+math.floor(game.evolution_factor*100/#game.players)), unit_search_distance = 600}
end
end
Any suggestions on a fix?
Thanks.