• Code error
    5 replies, posted
what is the problem with the code ? local Ang1 = Angle( 0, 0, 90 ) local Ang2 = Angle( 0, 0, 90 ) Ang1:RotateAroundAxis( Ang1:Right(), self.rotate ) Ang2:RotateAroundAxis( Ang2:Right(), self.rotate + 180 ) this is the console error : addons/bailnpc/lua/entities/npc_bail/cl_init.lua:47: bad argument #2 to 'RotateAroundAxis' (number expected, got nil)
self.rotate is nil.
self.rotate is nil. Maybe you meant self:GetAngles()?
self.rotate = self.rotate - ( 100*( self.lasttime-SysTime() ) ) self.lasttime = SysTime() I still have error
maybe don't post 1-2 lines of snippets but rather the whole function so we don't have to continuously guess what you "might" be doing wrong?
He did..
Sorry, you need to Log In to post a reply to this thread.