Entindex() not working.
Basically, I get an entity via a trace, put it down in local as "ent" and run this line to transport it's data to another function.
[code]self.Weapon:SetNetworkedVar( "lockid", ent:EntIndex() )[/code]
When I try to recall the index and get the entity itself, it says the entity is Null, through this code:
[code] local lockent = ents.GetByIndex(self.Weapon:GetNetworkedVar("lockid" ))
local lockpos = lockent:GetPos()[/code]
What am I doin wrong?
Did you compare the indexes?
Sorry, you need to Log In to post a reply to this thread.