/c local here_in_the_first_place = {} for k,player in pairs(game.players) do here_in_the_first_place[tostring(player.index)] = true end log("\nhere_in_the_first_place: "..serpent.block(here_in_the_first_place, {sparse = true})) local to_remove = {} local function remove_offline_players(maximum_age_in_hours) local maximum_age_in_ticks = maximum_age_in_hours * 216000 local t = game.tick - maximum_age_in_ticks if t < 0 then return end local players_to_remove = {} for _, player in pairs(game.players) do if player.last_online < t then table.insert(players_to_remove, player) to_remove[player.index] = true end end log("\nto_remove: "..serpent.block(to_remove, {sparse = true})) game.remove_offline_players(players_to_remove) end remove_offline_players(24) local still_here = {} for _, player in pairs(game.players) do still_here[player.index] = true end log("\nstill_here: "..serpent.block(still_here, {sparse = true})) local strings = {} for _, player in pairs(game.players) do if not player.connected then strings[#strings + 1] = "before: player: "..player.index.." "..player.name.." force: "..player.force.name strings[#strings + 1] = "player was not connected" player.force = game.forces.enemy strings[#strings + 1] = "after: player: "..player.name.." force: "..player.force.name end end log("\nplayer checks: "..serpent.block(strings, {sparse = true}))