Jump to content

How can I remove these decimal pts?


Recommended Posts

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

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

Hi,

for $i = Random(180, 210, 1) to 0 step -1

or

ToolTip("Post break time remaining: " & Round($i), 0, 0)

or

ToolTip("Post break time remaining: " & Ceiling($i), 0, 0)

or

ToolTip("Post break time remaining: " & Floor($i), 0, 0)

Cheers

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...