Skip to content

Commit

Permalink
Fix crash on non-admin member joining without being a faction member
Browse files Browse the repository at this point in the history
Resolves #24
  • Loading branch information
Danielv123 committed Apr 13, 2024
1 parent a6bd8d9 commit fc6589c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ local function set_player_permission_group(player)
-- Get claiming faction
local claiming_faction_id = global.gridworld.claiming_faction.faction_id
local faction = get_player_faction(player)
if claiming_faction_id == faction.faction_id then
if faction and claiming_faction_id == faction.faction_id then
player.permission_group = game.permissions.get_group("Owner")
player.print("Setting permission group to Owner")
else
Expand Down

0 comments on commit fc6589c

Please sign in to comment.