muzle6074 Posted May 12, 2008 Share Posted May 12, 2008 for $i = Random(180, 210) to 0 step -1 Sleep(1000) ToolTip("Post break time remaining: " & $i , 0, 0) Next My problem is when the tooltip displays it says "Post break time remaining: 189.7493845734895 (for example). How can I get it to not display all the decimal pts? Link to comment Share on other sites More sharing options...
monoceres Posted May 12, 2008 Share Posted May 12, 2008 for $i = Random(180, 210) to 0 step -1 Sleep(1000) ToolTip("Post break time remaining: " & $i , 0, 0) Next My problem is when the tooltip displays it says "Post break time remaining: 189.7493845734895 (for example). How can I get it to not display all the decimal pts? Two solution, force Random() to return a integer: Random(180,210,1) or use the Round() function Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
smashly Posted May 12, 2008 Share Posted May 12, 2008 Hi,for $i = Random(180, 210, 1) to 0 step -1orToolTip("Post break time remaining: " & Round($i), 0, 0)orToolTip("Post break time remaining: " & Ceiling($i), 0, 0)orToolTip("Post break time remaining: " & Floor($i), 0, 0)Cheers Link to comment Share on other sites More sharing options...
muzle6074 Posted May 12, 2008 Author Share Posted May 12, 2008 (edited) Thanks for the prompt reply monoceres and smashly Edited May 12, 2008 by muzle6074 Link to comment Share on other sites More sharing options...
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