User Tag List

Results 1 to 3 of 3

Thread: How to get a decimal in a number (string)

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,156
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Question How to get a decimal in a number (string)

    I am doing an app where I want the number that is displayed to always have one decimal. So if I add 0.5 every time I click the mouse button it should be like:

    0.5
    1.0
    1.5
    2.0
    2.5
    3.0

    etc

    But what happens now is:

    0.5
    1
    1.5
    2
    2.5
    3

    How can I force it to always have one decimal even on the even numbers?

    I tried to just * with 1.0 but that does not work..
    Attached files Attached files

  2. #2
    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator ProUnicode Add-on

    Join Date
    Jun 2011
    Posts
    628
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    That's because function $str(1.0) return 1 you should use FloatToString$(Global Value A, 2, 1 )

    Solution:
    https://www.dropbox.com/s/lti5ydmyty...cimal.mfa?dl=0

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,156
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Thank you!

Similar Threads

  1. Convert hexadecimal to decimal number
    By StingRay in forum Fusion 2.5
    Replies: 4
    Last Post: 9th September 2014, 04:31 PM
  2. Rounding a decimal number?
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 28th May 2012, 11:48 AM
  3. Number of string letters to a value
    By cajujoe in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 29th August 2011, 10:23 PM
  4. How to display a decimal number on screen?
    By keokeo in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 16th July 2008, 11:37 AM
  5. Decimal Number bug
    By Cocodrilo in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 5th April 2008, 12:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •