Target finding function now actually returns nil on an invalid input like it should

This commit is contained in:
Logan G 2022-03-26 13:19:17 -06:00
parent 22b74b3db6
commit 205bdc0272
Signed by: logan
GPG key ID: E328528C921E7A7A

View file

@ -349,7 +349,9 @@ end
-- Get's a player's entity by searching for it via an inputted string
function core:get_entity(ply)
if type(ply) == "Player" then
if ply == nil then
return nil
elseif type(ply) == "Player" then
return ply
elseif ply == "^" then
return owner()