Hello, I am not sure if it is intended to be that way. However this function in consolecommands.lua returns null and it is not usefull.
function c_selectnear(prefab, rad) local player = ConsoleCommandPlayer() local x,y,z = player.Transform:GetWorldPosition() local ents = TheSim:FindEntities(x,y,z, rad or 30) local closest = nil local closeness = nil for k,v in pairs(ents) do print("found", v.prefab) if v.prefab == prefab then print("found", v.prefab) if closest == nil or player:GetDistanceSqToInst(v) < closeness then closest = v closeness = player:GetDistanceSqToInst(v) end end end if closest then c_select(closest) end end
I think there should be `retrun c_select(closest)`.
Steps to Reproduce
It is nothing serious tho.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now