Error : " 'For' limit must be a value".


--[[ 		Globals		]]
playerTimer = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}

--[[ 		Code		]]

function Drawer()
local counter = 1
	for i = 1, count, 1 do
	local object = lol.GetPlayer(i)
		if object.team ~= player.team and object.team ~= TEAM_NONE and object.dead == 0 then
			if object.visible == 1 then
				if playerTimer* ~= 0 then
					playerTimer* = 0
					lol.DrawText(string.format("%s",object.charName),WINDOW_W - 90,counter*10,1,1,1,1);
				end
			end
		end
	end
end

function Timer( tick )
	local count = lol.GetPlayerCount()
	for i = 1, count, 1 do
		local object = lol.GetPlayer(i)
		if object.team ~= player.team and object.team ~= TEAM_NONE and object.dead == 0 then
			if object.visible == 1 then
				if printChat ~= 0 and playerTimer* == 0 then
				playerTimer[ i ] = tick
				end
			end
		end
	end
end


function Load()
	system.SetDrawCallback("Drawer")
	system.SetTimerCallback("Timer",500)
	lol.PrintChat(" >> Enemy Miss loaded!")
end

Problem is in the Drawer function, which is supposed to be the callback to draw from.
It says ‘for’ limit must be a number. o.O.
Any help is appreciated, thanks!

I already replied in your other thread in the questions subforum. No need to make 2 separate threads.

Check the first two lines of your Drawer code.

[lua]local counter = 1
for i=1,count,1 do[/lua]

Count =/= counter.

Likewise, if you’re trying to bring over the count variable under your Timer function, you have to make your “count” variable global there. Because it’s local currently, it won’t leave the scope of that function.

His problem was resolved in here.