I need to be able to create a timer that calls a function with multiple parameters but it doesn't work because after the first parameter the next one goes into the count parameter.
1
timer(1000,"meditateStage2",id,x,y)
Any help will be appreciated.
timer(1000,"meditateStage2",id,x,y)
timers = {} function advtmr(time,func,var) if not time then	for k,v in pairs(timers) do	timers[k] = 1	end	return	end local ar for i = 1,#timers+1 do	if not timers[i] then	ar = i	break	end	end timers[ar] = {f = func,v = var} timer(time,"exectimer",ar) end function exectimer(array) local ar = tonumber(array) if not timers[ar] then	return elseif type(timers[ar]) == "table" then	timers[ar].f(timers[ar].v and unpack(timers[ar].v)) end timers[ar] = nil end
timers = {} function advtmr(time,func,var) if not time then	for k,v in pairs(timers) do	timers[k] = 1	end	return	end local ar for i = 1,#timers+1 do	if not timers[i] then	ar = i	break	end	end timers[ar] = {f = func,v = var} timer(time,"exectimer",ar) end function exectimer(array) local ar = tonumber(array) if not timers[ar] then	return elseif type(timers[ar]) == "table" then	timers[ar].f(timers[ar].v and unpack(timers[ar].v)) end timers[ar] = nil end
LUA ERROR: sys/lua/Master_Yi/main.lua:58: attempt to call field 'f' (a string value)
timers[ar].f(timers[ar].v and unpack(timers[ar].v))
function example(a,b) timer(1000,"parse","lua example2(a,b)",0) end function example2(a,b) --some code end
function example(a,b) timer(1000,"parse","lua example2("..a..", "..b..")",0) end