lolman Posted August 10, 2015 Posted August 10, 2015 Hello, Since I'm using this function : getTimerDetails() I see messages on debugconsole everytime the timer is false... at the function it says that I can prevent it by using the function isTimer() but I've used all methods (almost) but nothing ... This is my code : theTimer = setTimer(function() end, 2000, 1) function timerDetails() remaining = ( getTimerDetails(theTimer) /1000 ) if (remaining) then if isTimer(theTimer) then dxDrawText("Time : "..remaining, 574, 543, 790, 590, tocolor(255, 187, 23, 255), 1.50, "bankgothic", "left", "top", false, false, false, false, false) else return end end end addEventHandler("onClientRender", root, timerDetails) If someone could help me to prevent this debug message I'd be glad! Futuristic Gaming RPG http://adf.ly/1KwDeT
t3wz Posted August 10, 2015 Posted August 10, 2015 what about getting timer details after checking if it exists? if theTimer and isTimer ( theTimer ) then local remaining = getTimerDetails ( theTimer )
lolman Posted August 10, 2015 Author Posted August 10, 2015 Still doesn't work... see the debugs ... Futuristic Gaming RPG http://adf.ly/1KwDeT
t3wz Posted August 10, 2015 Posted August 10, 2015 Still doesn't work... see the debugs ... Well, this code: theTimer = setTimer(function() theTimer = nil end, 2000, 1) function timerDetails() if theTimer and isTimer ( theTimer ) then local remaining = getTimerDetails ( theTimer ) /1000 dxDrawText("Time : "..remaining, 574, 543, 790, 590, tocolor(255, 187, 23, 255), 1.50, "bankgothic", "left", "top", false, false, false, false, false) end end addEventHandler("onClientRender", root, timerDetails) works here.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now