Skip to content

Commit

Permalink
fix(server): net return nil if state is duplicated in other entity
Browse files Browse the repository at this point in the history
  • Loading branch information
renzuzu committed Mar 8, 2023
1 parent a789344 commit b8e01e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/main.lua
Expand Up @@ -78,7 +78,7 @@ GetIdentifiers = function(id)
local numIdentifiers = GetNumPlayerIdentifiers(id)
for i = 0, numIdentifiers do
local identifier = GetPlayerIdentifier(id, i)
if string.find(GetPlayerIdentifier(id, i),'license') then
if string.find(tostring(identifier),'license') then
license = identifier
break
end
Expand All @@ -92,7 +92,7 @@ for name,v in pairs(Config.Status) do
if value == nil then return end
local status = GlobalState.PlayerStates
local net = tonumber(bagName:gsub('player:', ''), 10)
if logout[net] then return end
if net and logout[net] or not net then return end
local ply = Player(net).state
if not status[ply.identifier] then status[ply.identifier] = {} end
status[ply.identifier][name] = value
Expand Down

0 comments on commit b8e01e9

Please sign in to comment.