New Column in TTT?

So I was working on adding a ttt column for utime’s timer. I am not very experienced with lua, but in theory I think this should work.

My current error is:

Which line 34 is:



self:AddColumn( GetTranslation("sb_timer"), function(ply) return (time/60), 0) end )


The full code for this is:



   local time = math.Round(ply:GetUTimeTotalTime(), 0)
   
   if time < 60 then
      self:AddColumn( GetTranslation("sb_timer"), function(ply) return time end )
   elseif time >= 60 < 3600 then
      self:AddColumn( GetTranslation("sb_timer"), function(ply) return (time/60), 0) end )
   elseif time >= 3600 then	
	  self:AddColumn( GetTranslation("sb_timer"), function(ply) return (time/3600), 0) end )
   end


If anyone can help me with this that would be wonderful!


self:AddColumn( GetTranslation("sb_timer"), function(ply) return (time/60), 0 end )

Well that fixed that error but now I get the sameold error I always get:

Which 218 is perfectly fine, just don’t know how to fix the error.



   self.nick:SetFont("treb_small")


What do you define with self.nick?

It is in the default terrortown gamemode, so I know it is not an issue.

I’m not sure why you are using GetTranslation() unless you actually went in and translated that text for for every language but here is how you’d add a new column in addon format using a hook. You don’t ever really want to edit the gamemode, it gets messy.

[lua]hook.Add(“TTTScoreboardColumns”, “SomeTimerStuff”, function(panel)
panel:AddColumn(“Timer”, function(ply)
local time = ply:GetUTimeTotalTime() or 0

	if time &gt;= 3600 then
		time = time/3600
	elseif time &gt;= 60 then
		time = time/60
	end

	return math.floor(time)
end)

end)[/lua]

Rip me. How would I go about adding h and s next to the times?