Console command and auto complete

I’m trying to make 2 console commands that will allow you to set the health and armor of who ever you want. The problem is if the name has a space it wont work, how would I fix that?

I have this:

[lua]if not SERVER then return end

function AutoSetVal(cmd, arg)

local tab = {}
for k,pl in ipairs(player.GetAll()) do
	table.insert(tab, k, cmd.." "..pl:Nick())
end

return tab

end

function SetVal(self, cmd, val)

if not self:IsAdmin() then return end

local Name = val[1]
local Ammount = val[2]
local Target = nil

if not Ammount then
	
	Ammount = 100
	
end

if not tonumber(Ammount) then return end

if not Name then
	
	Name = self:Nick()
	Target = self
	
elseif Name == self:Nick() then
	
	Target = self
	
else
	
	for _,pl in ipairs(player.GetAll()) do
		if pl:Nick() == Name then
		
			Target = pl
		
		else
			
			return
			
		end
	end
	
end

if cmd == "setarmor" then
	
	Target:SetArmor(Ammount)
	print(Name.."'s armor set to "..Ammount)
	return
	
end

if cmd == "sethealth" then
	
	if Ammount == 0 then
		Ammount = 1
	end
	
	Target:SetHealth(Ammount)
	print(Name.."'s health set to "..Ammount)
	return
	
end

end
concommand.Add(“setarmor”, SetVal, AutoSetVal)
concommand.Add(“sethealth”, SetVal, AutoSetVal)[/lua]