• attempt to call arithmetics on local "direction","DIR" (a nil value)
    1 replies, posted
I have fixed few addons so far but I don't get what's wrong with these. I will be appreciated if you help me. Errors printed on console: [CODE][ERROR] addons/addonnamehere/lua/autorun/server/bf.lua:298: attempt to perform arithmetic on local 'direction' (a nil value) [ERROR] addons/addonnamehere/lua/autorun/server/stuff_sv.lua:383: attempt to perform arithmetic on local 'DIR' (a nil value)[/CODE] Code: [CODE] self.Mantle_Dir = direction self.Mantle_Vel = vel self:SetLocalVelocity( direction*vel + Vector(0,0,50) ) [/CODE] [CODE]self:SetPos( self:GetPos() + Vector(0,0,40) ) local DIR = self:GetVelocity():Normalize() self:SetVelocity( DIR*150 + Vector(0,0,175) ) [/CODE]
direction is nil
Sorry, you need to Log In to post a reply to this thread.