try to fix disbanding

This commit is contained in:
Elkien3 2018-04-17 17:47:45 -05:00
parent 492ead204e
commit f1e4fa8eaf

View File

@ -249,9 +249,14 @@ function factions.Faction.add_player(self, player, rank)
end
function factions.Faction.check_players_in_faction(self)
local factionRef = factions.get_faction(self)
local players = #factionRef.players
if players and players < 1 then
local i = 0
if self.players then
for self.players
i = i + 1
end
end
--local players = #self.players
if i < 1 then
self:disband("Zero players on faction.")
end
end