npc lua spawn function

I am trying to give an npc a gun and ammo using lua

here is the function

function Add_NPC(pl, command, args) --Adds an NPC
local tr = pl:GetEyeTrace() – tr now contains a trace object
local ent = ents.Create(“npc_combine_s”) – This creates our npc entity
ent:SetPos(tr.HitPos) – This positions the npc at the place our trace hit.
ent:Spawn() – This method spawns the npc into the world
ent:Give(“weapon_pistol”) – This method gives the npc a pistol
–ent:Give(“item_ammo_pistol”) --Crashes the game
–ent:GiveAmmo(9999, “Pistol”) --Crashes the game
–ent:SetTarget( )
concommand.Add( “Add_NPC”, Add_NPC )