From 492ead204ee7bd980b80e7770e0da2e6cfd6ea75 Mon Sep 17 00:00:00 2001 From: Elkien3 Date: Tue, 17 Apr 2018 17:33:25 -0500 Subject: [PATCH] try to fix always disbanning --- mods/factions/factions.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/factions/factions.lua b/mods/factions/factions.lua index 3191080..3863780 100644 --- a/mods/factions/factions.lua +++ b/mods/factions/factions.lua @@ -249,8 +249,9 @@ function factions.Faction.add_player(self, player, rank) end function factions.Faction.check_players_in_faction(self) - local players = #self.players - if players < 1 then + local factionRef = factions.get_faction(self) + local players = #factionRef.players + if players and players < 1 then self:disband("Zero players on faction.") end end