ABoHussin Posted August 15, 2017 Share Posted August 15, 2017 Hi all .. i have a question about getTimerDetails I made a code to fetch the Timer information and turn it into minutes __________________________________ if _mytimer and isTimer(_mytimer) then _r,_e,_t = getTimerDetails(_mytimer) if _r and _e and _t then total = _r / 60 / 1000 outputChatBox("remain :: "..math.ceil(total)) end end ______________________ Everything is good . The code works successfully but I want it to bring minutes with seconds Like this remain : 3 m : 15 s 3 m : 14s any help ? Link to comment
Administrators Lpsd Posted August 15, 2017 Administrators Share Posted August 15, 2017 local remaining, executesRemaining, totalExecutes = getTimerDetails(timer) -- Get the timers details local s = remaining/1000 local clock = string.format("%.2d:%.2d", s/60%60, s%60) something like that Link to comment
NeXuS™ Posted August 15, 2017 Share Posted August 15, 2017 Use [ code] tag next time. 1 Link to comment
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