for _,v in next, ents.FindByClass("prop_*") do
local owner = APA.FindOwner(v);
local box = Vector(0,0,0);
if IsValid(owner) and IsValid(v) and not APA.IsWorld(v) then
box = v:LocalToWorld(v:GetCollisionBounds());
if box and isvector(box) then
for _,x in next, ents.FindInBox(box) do
print(v, owner, x)
if IsValid(x) and isPlayer(x) then
makeSpawnGhost(v,owner)
print(x)
end
end
end
end
end
Getting the following error...
bad argument #2 to 'FindInBox' (Vector exp
ected, got no value)
This is not the full code, but I assure you that all the functions work, but for some reason the box variable gets lost.