Timer Error: attempt to call a nil value

I am getting the error:
Timer Error: attempt to call a nil value

With this code:


function countdown(pl)
	comboammount=pl:GetVar("comboammount")
	timeleft=pl:GetVar("timeleft")
	if pl:GetVar("timeleft")<=0 then
		pl:SetVar("comboammount",0)
		pl:SendLua("StreakCounter("..comboammount..","..timeleft..")")
		return
	end
	pl:SendLua("StreakCounter("..comboammount..","..timeleft..")")
	pl:SetVar("timeleft",timeleft-1)
	timer.Simple( 1, countdown(pl))
end

any idea why this is happening?


(User was banned for this post ("Wrong section" - mahalis))

[lua]timer.Simple( 1, countdown, pl )[/lua]

In your code, you are sending the return value of your function to the timer (Which is nil).