Vector problems

I’m trying to my first ever time to create my own add on, after mainly editing them.

What I’m trying to do is take the entity’s Z position, add 5 ( which I already figured won’t work, since vectors ) and teleport the player to it after 10 seconds.
Since addition doesn’t work I just inverted the Z axis and tried to multiply it, same error.
[lua]
AddCSLuaFile(“cl_init.lua”)
AddCSLuaFile(“shared.lua”)
include(“shared.lua”)

function ENT:Initialize()
self:SetModel(“models/props_c17/pottery03a.mdl”)
self:SetMaterial(“debug/env_cubemap_model”)

self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
self:SetUseType(SIMPLE_USE)

local phys = self:GetPhysicsObject()
if phys and phys:IsValid() then phys:Wake() end

self.damage = 60
local owner = self:Getowning_ent()
self:TeleportOwner()

end

function ENT:OnTakeDamage(dmg)
self.damage = self.damage - dmg:GetDamage()
if self.damage <= 0 then
self:Remove()
end
end
function ENT:TeleportOwner( owner )
if self:Getowning_ent():Alive() then
timer.Simple(10, function ()
local TelePos = self:GetPos()
local x = TelePos.x
local y = TelePos.y
local z = TelePos.z
local z = -z
print(z)
self:Getowning_ent():SetPos(x, y, z )
end)
else
return false
end
end
[/lua]

It works if I don’t invert the Z axis.
Any help will be appreciated.

Besides that, I got a overriding hook ( as it seems ) on PlayerSpawn, since using this doesn’t work:
[lua]hook.Add(“PlayerSpawn”, “RPlayerSpawn”, function()
print(“hi”)
end)[/lua]
What can I do to disable the override or possibly how can I find the overriding hook?

Thanks and sorry if all those are stupid.

Vector addition always worked for me:

[lua]
if Vector(1,2,3)+Vector(0,5,0)==Vector(1,7,3) then
print(“worked”)
end
[/lua]

I tried to do something like this:

		[lua]local TelePos = self:GetPos()
		local x = TelePos.x
		local y = TelePos.y
		local z = TelePos.z
                    local AddedZ = z + 5
		print(AddedZ)[/lua]

It returned an error.

Works fine for me:

http://puu.sh/4ytHY.png

[editline]23rd September 2013[/editline]

Just read what the error said. It usually contains all the info you need to fix your problem.

Says that it expected vector and got numbers.
Not my first time getting the error either.

[editline]23rd September 1999[/editline]

The problem seems to be in SetPos.
Trying to do SetPos(x, y, z) with the code above and it gives me that error.
Help?

[lua]
ent:SetPos(Vector(x,y,z))
[/lua]
You have to give the function a vector, not 3 numbers.

Ah shiet, feel free to rate me dumb.
Thanks for all the help!