DarkRP.FindEmptyPos a nil value

ERROR Attempt to call field ‘FindEmptyPos’ (a nil value)

line owner:SetPos(DarkRP.FindEmptyPos(trace.HitPos, {owner}, 100, 30, Vector(16, 16, 64)));

help me please fix error


function SWEP:TeleKill()

	local owner = self.Owner;

	local trace = owner:GetEyeTrace();

	local target = trace.Entity;



	if (IsValid(target) and target:IsPlayer()) then

		if (!target:HasGodMode()) then

			if (owner:GetPos():DistToSqr(target:GetPos()) <= math.pow(350, 2)) then

				local damageInfo = DamageInfo();



				damageInfo:SetAttacker(owner);

				damageInfo:SetInflictor(self);

				damageInfo:SetDamage(target:Health());

				

				target:TakeDamageInfo(damageInfo);

					

				DarkRP.notify(target, 1, 2, "You were killed.");

				DarkRP.notify(owner, 1, 4, "Teleportation complete and target killed.");

				

				owner:SetPos(DarkRP.FindEmptyPos(target:GetPos(), {owner}, 100, 30, Vector(16, 16, 64)));



				self:SetNextPrimaryFire(CurTime() + 10);

				self:SetNextSecondaryFire(CurTime() + 10);

			else

				DarkRP.notify(owner, 1, 2, "Target out of range.");

			end;

		end;

	else

		if (owner:GetPos():DistToSqr(trace.HitPos) <= math.pow(350, 2)) then

			DarkRP.notify(owner, 1, 2, "Teleportation complete.");



			owner:SetPos(DarkRP.FindEmptyPos(trace.HitPos, {owner}, 100, 30, Vector(16, 16, 64)));



			self:SetNextPrimaryFire(CurTime() + 10);

			self:SetNextSecondaryFire(CurTime() + 10);

		else

			DarkRP.notify(owner, 1, 2, "Destination out of range.");

		end;

	end;

end;