OK so i am setting up timers and i have one that counts down but i cant get the other one to get down. Here are the codes i am using for both of them.
timer 1 (works)
local countdowntxt = display.newText(time\_remain, 0, 0, "Times New Roman", 16\*2);
countdowntxt.xScale = 1; countdowntxt.yScale = 1;
countdowntxt:setReferencePoint(display.CenterRightReferencePoint);
countdowntxt.x = \_W-20; countdowntxt.y = \_H-20;
local function countDown(e)
time\_remain = time\_remain - 1;
countdowntxt.text = time\_remain;
end
if(o == total\_mints) then
gametmr = timer.performWithDelay(1000, countDown, 1814400)
end
And The one for the second timer that doesnt work.
local countdowntxt = display.newText(time\_remain2, 0, 0, "Times New Roman", 16\*2);
countdowntxt.xScale = 1; countdowntxt.yScale = 1;
countdowntxt:setReferencePoint(display.CenterLeftReferencePoint);
countdowntxt.x = \_W-460; countdowntxt.y = \_H-20;
local function countDown(e)
time\_remain2 = time\_remain2 - 1;
countdowntxt.text = time\_remain2;
end
if(o == time\_remain2) then
gametmr = timer.performWithDelay(60000, counDown, 30240)
end
Any help would be greatly appreciated. [import]uid: 69054 topic_id: 18623 reply_id: 318623[/import]
[import]uid: 52491 topic_id: 18623 reply_id: 71531[/import]