C:\Documents and Settings*****\Desktop\Dedicated server\Gameserver\orangebox\garrysmod\gamemodes\WW2\gamemode–init.lua
I recently started making a gamemode base off of WWII and have come across this error while shifting the gamemode from one server to the other. I haven’t touched the gamemode in any way while moving it before and after.
Here is what its snapping at, it comes up with the error in the title on line 285 my health regeneration.
Sorry but the BBcode isnt working properly for me.
function EntityTakeDamage( ent )
if ( ent:IsPlayer() ) then
ent.Regen = CurTime() + 5
hook.Add(“EntityTakeDamage”, “WW2_EntityTakeDamage”, EntityTakeDamage)
local RegenTime = 0
local function Regen()
local CT = CurTime()
if RegenTime < CT then
RegenTime = CT + 1
for _, ply in pairs(player.GetAll()) do
if ply:Alive() and (ply.Regen or 0) < CT and ply:Health() < 100 then
ply:SetHealth(ply:Health() + 1)
hook.Add(“Think”, “WW2_Regen”, Regen)