attempt to index field 'Owner' (a nil value)

I an trying to set the Name of an entity to it’s owner, but it’s not working,

[addons\displacement cannon\lua\entities\sent_arc_entry_portal_creator\init.lua:28] attempt to index field ‘Owner’ (a nil value)
I don’t know why it is happening.

[lua]
–Here’s line 28 here
self:SetName(self.Owner:SteamID()…“s_EntryPortalCreator”)

–and I DID set the owner, TWICE! so I’m pretty stuck,
function ENT:SpawnFunction( ply, tr )
--------Spawning the entity and HOPEFULLY setting the owner.
if ( !tr.Hit ) then return end

local SpawnPos = tr.HitPos + tr.HitNormal * 10 
 
local ent = ents.Create( "sent_arc_entry_portal_creator" )
ent:SetPos( SpawnPos ) 
ent:Spawn()
ent:Activate() 
ent.Owner = ply
ent:SetOwner(ply)
Msg(tostring(ply).."is dah player

") --I just use this to see if “ply” is actually being set, it is.
return ent

end
[/lua]

Where is the owner set? This isn’t a SWEP.

Lines
16 and 17 in my example

whats before line 28?

It’s in the Init function
[lua]
function ENT:Initialize()
self.Entity:SetModel(“models/hunter/tubes/circle2x2.mdl”)
self.Entity:PhysicsInit(SOLID_VPHYSICS)
self.Entity:SetMoveType(MOVETYPE_VPHYSICS)
self.Entity:SetSolid(SOLID_VPHYSICS)
local phys = self.Entity:GetPhysicsObject()
if(phys:IsValid()) then phys:Wake() end
self:SetName(self.Owner:SteamID()…“s_EntryPortalCreator”)
self.WireInputDelay = CurTime() + 2
for _, othercreators in ipairs( ents.FindByName(self.Owner:SteamID()…“s_EntryPortalCreator”) ) do
othercreators:Remove()
self.Owner:SendLua(“GAMEMODE:AddNotify(“Your previous creator has been removed.”, NOTIFY_GENERIC, 5)”)
end
self.Inputs = Wire_CreateInputs(self, { “Open Portal”, “Close Portal” , “Switch Portal Locations” , “Pos X”, “Pos Y”, " Pos Z"})
end
[/lua]

[editline]25th December 2011[/editline]

Line 8 is 28

Try self:GetOwner() instead.