User Tag List

Results 1 to 5 of 5

Thread: Writing and reading decimal numbers to an INI file?

  1. #1
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Paul_Boland's Avatar
    Join Date
    Jun 2006
    Location
    Waterford, Ireland.
    Posts
    2,739
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Writing and reading decimal numbers to an INI file?

    Hi Folks.

    I need to be able to write and read decimal numbers to/from an INI file but all attempts to get it to work have failed. I have a counter which stores a X.XX number in it on screen. I need to write this to an INI file and read it back again later, but nothing seems to work. If the number was 2.56, the INI file will only get he value 2. If I create an INI entry to read 7.43 and try to read it back into a counter on screen, all I get back is 7.

    Anyone know how to store and read decimal numbers to/from an INI file?
    KnightTrek Productions
    http://www.knighttrek.com

  2. #2
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    ratty's Avatar
    Join Date
    Apr 2012
    Posts
    1,171
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Could you multiply the counter by 10, then store it, and divide the ini value by 10 before reapplying it to your program?

    Additionally, could you store it as a string and then use the value of the string once it's recalled from the ini?

  3. #3
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Pineapple's Avatar
    Join Date
    Oct 2010
    Posts
    431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know for sure the array will only use whole numbers, so maybe it's the same for the .ini file as well.

  4. #4
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Paul_Boland's Avatar
    Join Date
    Jun 2006
    Location
    Waterford, Ireland.
    Posts
    2,739
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the feedback. I'll try some of your suggestions, Ratty, later and they should work.
    KnightTrek Productions
    http://www.knighttrek.com

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export Module
    Windybeard's Avatar
    Join Date
    Nov 2006
    Location
    London
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use arrays alot and i always multiply by 100 and divide back when needed. Its always worked ok for me.

Similar Threads

  1. Array object not reading/writing properly
    By PapaKirk in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 12th September 2013, 12:38 AM
  2. Decimal numbers in Alterable Values?
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 1st January 2012, 05:05 PM
  3. I have a problem with decimal numbers
    By daniele in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 10th February 2009, 12:35 AM
  4. question about decimal numbers
    By Attus in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 16th October 2008, 08:43 AM
  5. Decimal numbers
    By Muz in forum Multimedia Fusion 2 - Technical Support
    Replies: 13
    Last Post: 25th February 2008, 05:58 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
  •