Skip to content

Commit

Permalink
Merge pull request #597 from DaniGP17/main
Browse files Browse the repository at this point in the history
fix(server/functions): handle nil player names and fallback to citizenid
  • Loading branch information
GhzGarage authored Feb 24, 2025
2 parents c857997 + e3248f1 commit fd106d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function LoadInventory(source, citizenid)
end

if #missingItems > 0 then
print(('The following items were removed for player %s as they no longer exist: %s'):format(GetPlayerName(source), table.concat(missingItems, ', ')))
print(('The following items were removed for player %s as they no longer exist: %s'):format(source and GetPlayerName(source) or citizenid, table.concat(missingItems, ', ')))
end

return loadedInventory
Expand Down

0 comments on commit fd106d1

Please sign in to comment.