I have a code i am trying to work on a timer, it is supposed to add one point to the number of proficiency points.
function HumanTimer(ply) local up = 1 Total_Proficiency_Points = Total_Proficiency_Points + up for k,v in pairs(player.GetAll()) do if ValidEntity(v) && v:IsHuman() then v.Prof_Points = v.Prof_Points + up --v:SendProfPoints() end end ply.Prof_Points = Total_Proficiency_Points --ply:SendProfPoints() end
But when i tried to add the timer to the sv_round_begin
timer.Create( "Points", 45, 0, HumanTimer, ply )
I get the error in the title, am i doing something terribly wrong (not very familiar with Lua and have never used a timer before) I googled the use of timer.Create and it seemed to be used in that fashion.
I am trying to add 1 point to the value Prof_Points/Total_Proficiency_Points every 45 seconds.
EDIT: I am putting the timer in the sv_round_begin instead of the location of the actual function because i want it to run on roundstart.