Help fix broken gamemode

About a year ago i made a ReDead server & everything worked fine. now because of some updates to gmod it has alot of errors last time this happened it was a easy fix. if i remember correctly it was just a matter of changing some caps letters to lowercase. But this time idk what to do at all here is a list of errors & the lines of code.

ERRORS

[ERROR] gamemodes/redead/entities/entities/npc_nb_base/shared.lua:175: attempt to index field ‘LastPos’ (a nil value)

  1. StuckThink - gamemodes/redead/entities/entities/npc_nb_base/shared.lua:175
  2. unknown - gamemodes/redead/entities/entities/npc_nb_base/shared.lua:86

[ERROR] gamemodes/redead/entities/entities/npc_nb_base/shared.lua:63: attempt to index field ‘loco’ (a nil value)

  1. unknown - gamemodes/redead/entities/entities/npc_nb_base/shared.lua:63

[ERROR] gamemodes/redead/entities/entities/npc_nb_base/shared.lua:564: attempt to index field ‘DmgTable’ (a nil value)

  1. SetHeadshotter - gamemodes/redead/entities/entities/npc_nb_base/shared.lua:564
  2. OnLimbHit - gamemodes/redead/entities/entities/npc_nb_base/shared.lua:228
    3. unknown - gamemodes/redead/entities/weapons/rad_base/shared.lua:606
    4. FireBullets - [C]:-1
    5. ShootBullets - gamemodes/redead/entities/weapons/rad_base/shared.lua:618
    6. unknown - gamemodes/redead/entities/weapons/rad_base/shared.lua:480

LINES OF CODE WITH ERRORS


function ENT:StuckThink()

    if self.LastPos:Distance( self.Entity:GetPos() ) < 50 then

        self.Entity:StartRespawn()

    end




if ( self.Stuck or 0 ) < CurTime() then

        self.Entity:StuckThink()

        self.Stuck = CurTime() + 10
        self.LastPos = self.Entity:GetPos()

    end


function ENT:Initialize()

    if self.Models then

        local model = table.Random( self.Models )
        self.Entity:SetModel( model )

    else

        self.Entity:SetModel( self.Model )

    end

    self.Entity:SetHealth( self.BaseHealth )
    self.Entity:SetCollisionGroup( COLLISION_GROUP_NPC )
    self.Entity:SetCollisionBounds( Vector(-4,-4,0), Vector(4,4,64) ) // nice fat shaming
    self.Entity:SetSkin( math.random( 0, self.Skins ) )

    self.loco:SetDeathDropHeight( 1000 )
    self.loco:SetAcceleration( 500 )
    self.loco:SetJumpHeight( self.JumpHeight )

    self.DmgTable = {}
    self.LastPos = self.Entity:GetPos()
    self.Stuck = CurTime() + 10

end



If anyone is willing to fix the ReDead gamemode please pm me. & if you succeed & deliver me a fixed version i will pm you a $15 amazon e-giftcard code.

Wow really? No takers i thought maybe adding in reward would help speed things up but guess not :frowning:

Hire a coder in scriptfodder also.

I think there’s already a Redead mod in the Workshop, have you tried it?

Well yea that & the svn is what needs to be fixed

I have found the problem & fixed it the problem was that all the npc’s needed a cl_init.