mirror of
https://github.com/CapsAdmin/pac3.git
synced 2025-03-04 03:03:01 -05:00
Handle SteamID64 not always returning anything
Player [13][redacted] ERR: [Cmd] 'pac_wear_parts' failed: lua/pac3/editor/client/wear_filter.lua:184: wrong number of arguments to 'insert'
This commit is contained in:
parent
815deaaf11
commit
cc7c0a7320
@ -25,7 +25,12 @@ function pac.Hash(obj)
|
||||
return "bot " .. tostring(obj:EntIndex())
|
||||
end
|
||||
|
||||
return steamid64(obj)
|
||||
local hash = steamid64(obj)
|
||||
if not hash then
|
||||
ErrorNoHalt( "FIXME: Did not get a steamid64 for a player object " .. tostring(obj) .. ', valid=' .. tostring(IsValid(obj)) .. '\n' )
|
||||
hash = "0"
|
||||
end
|
||||
return hash
|
||||
elseif t == "number" then
|
||||
return string_hash(tostring(t))
|
||||
elseif t == "table" then
|
||||
|
Loading…
Reference in New Issue
Block a user