[1.1.35] Desync on Modded Scenario

This subforum contains all the issues which we already resolved.
Post Reply
peacemaker83
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Dec 18, 2020 9:19 pm
Contact:

[1.1.35] Desync on Modded Scenario

Post by peacemaker83 »

Every player get desync after few minutes from start. Its the 2nd time i've run the map with the weaponbalancer mod so i think maybe the problem is in the scenario code. The desync occurs without doing anything special.

https://www.mediafire.com/file/kkwaa4le ... 7.zip/file

here is some code i added lately

function write_player_list()
local players = { }
for _, player in pairs(game.connected_players) do
table.insert(players, player.name)
end
local string = table.concat(players, "\n")
if string == nil or string == "" then string = "None" end
game.write_file("players.txt",string)
end

local Event = require 'utils.event'
Event.add(defines.events.on_player_joined_game, write_player_list)
Event.add(defines.events.on_player_left_game, write_player_list)

User avatar
Gerkiz
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Fri Nov 30, 2018 3:36 pm
Contact:

Re: [1.1.35] Desync on Modded Scenario

Post by Gerkiz »

Hello,

The author of this scenario has coded it a bit wrongly.

The author is storing LuaPlayer as a key inside a global table...

Code: Select all

key = {
    ["{LuaPlayer, name = 'Gerkiz', index = 1}"] = true,
    [{
      magic = "802384732948701238470123",
      playertarget = 2,
      type = 21
    }] = true
}
I'll push a fix to our repo.

/Gerkiz

User avatar
Gerkiz
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Fri Nov 30, 2018 3:36 pm
Contact:

Re: [1.1.35] Desync on Modded Scenario

Post by Gerkiz »


Post Reply

Return to “Resolved Problems and Bugs”