Can someone help me with a error please?

So my server console keeps repeating a error constantly no matter what. The error:


[ERROR] gamemodes/surf/gamemode/core_data.lua:180: Tried to use a NULL entity!
  1. Send - [C]:-1
   2. Send - gamemodes/surf/gamemode/core_data.lua:180
    3. RestartPlayer - gamemodes/surf/gamemode/sv_timer.lua:144
     4. unknown - gamemodes/surf/entities/entities/game_timer/server.lua:45

The Functions

  1. Unknown


function Core:Broadcast( szAction, varArgs, varExclude )
	net.Start( Core.Protocol )
	net.WriteString( szAction )
	
	if varArgs and type( varArgs ) == "table" then
		net.WriteBit( true )
		net.WriteTable( varArgs )
	else
		net.WriteBit( false )
	end
	
	if varExclude and (type( varExlude ) == "table" or (IsValid( varExclude ) and varExclude:IsPlayer())) then
		net.SendOmit( varExclude )
	else
		net.Broadcast()
	end
end


function PLAYER:RestartPlayer()
	Command:RemoveLimit( self )
	Command.Restart( self )
	Core:Send( ply, "Print", { "Surf Timer", Lang:Get( "ZoneRestart" ) } )
end


function ENT:StartTouch( ent )  
	if IsValid( ent ) and ent:IsPlayer() and ent:Team() != TEAM_SPECTATOR then
		local zone = self:GetZoneType()
		if zone == Zone.MStart then
			ent:ResetTimer()
		elseif zone == Zone.MEnd and ent.Tn and not ent.TnF then
			ent:StopTimer()
		elseif zone == Zone.BStart then
			ent:BonusReset()
		elseif zone == Zone.BEnd and ent.Tb and not ent.TbF then
			ent:BonusStop()
		elseif zone == Zone.AC then
			ent:StopAnyTimer()
		elseif zone == Zone.Restart then
			ent:RestartPlayer()
		end
	end
end

The Specific Lines

  1. Unknown


	net.Send( ply )


	Core:Send( ply, "Print", { "Surf Timer", Lang:Get( "ZoneRestart" ) } )


			ent:RestartPlayer()

Does anyone know how I could fix this? Thank you for any help.

Trying anything is useless, Gamemode experts have been trying to fix this for years.
The best resolution is to shut down your server before it corrupts the sv.db

Looks like it has stopped all of a sudden. I am guessing it will start again some point later.

I’ve helped someone before with it, The way we fixed it is by reinstalling the gamemode (data)

Oh, cool. I’ll give it a try.

Fixed.

[editline]11th February 2017[/editline]

Thanks for the help! :slight_smile: