User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: Decimals with .ini files and counters.

  1. #1
    No Products Registered

    Join Date
    Dec 2006
    Posts
    319
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Decimals with .ini files and counters.

    I am confused. Do .ini files store decimal values? And do counters and string objects display decimal values? If yes then how?


  2. #2
    No Products Registered

    Join Date
    Dec 2006
    Posts
    319
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Decimals with .ini files and counters.

    Got it. I store numbers as strings and convert using VAL. I apologize for the wasteful topic.

  3. #3
    No Products Registered

    Join Date
    Dec 2006
    Posts
    319
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Decimals with .ini files and counters.

    Actually there's more. I read somewhere about ini files:


    "my item = my string text
    my item : my values"


    Do string items actually use the "=" sign, and values the ":" sign? If yes then why does my program ignore the value items in the ini file that have the ":" sign? For example If I set an event to do this:
    set value 0 to item "door"

    And my ini file looks like this:
    [my group]
    door:2

    the program ignores my item and does this:
    [my group]
    door:2
    door=0



    Any ideas?

  4. #4
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,341
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)

    Re: Decimals with .ini files and counters.

    There isn't a standard structure for ini files - it's determined by the program that loads/saves the file.
    In the case of MMF2, you use square-brackets for group names, and "=" to declare a value/string - and that's it.
    Anything you might have read about ini files elsewhere is irrelevant.

  5. #5
    No Products Registered

    Join Date
    Dec 2006
    Posts
    319
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Decimals with .ini files and counters.

    Thanks for clearing things up MuddyMole.


    Could someone please tell me why this doesn't work?:

    http://www.mediafire.com/?s9v8p1ojyn9iyrn


    I want it to (every 0.10 seconds) add 0.1 to the item "app1" in the ini file and display that in the counter. It works with integers but not decimals.

  6. #6
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,824
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)

    Re: Decimals with .ini files and counters.

    Trying to write an INI value every .10 of a second might not be the best use of CPU.

    What do you want the end result to be and maybe we can come up with some advice on how to accomplish it.

  7. #7
    No Products Registered

    Join Date
    Dec 2006
    Posts
    319
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Decimals with .ini files and counters.

    I thought ini functionality would be light on cpu. And why doesn't my example work anyway?


    Eitherway, I am trying to make dialogue text. I want to count the length (lettercount) of each message and use that number to calculate an appropriate time interval before which the player will not be able to skip to the next message. So if a message is e.g. 80 letters long, the time interval would be something like 80*0.10. (I use the counter only for myself to see what I am doing.)

  8. #8
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,824
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)

    Re: Decimals with .ini files and counters.

    I would bet you need to store the decimal as a string then convert it to a number when you use it for calculations in MMF.




  9. #9
    No Products Registered

    Join Date
    Dec 2006
    Posts
    319
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Decimals with .ini files and counters.

    Yes that is sort of the solution but I still couldn't get it to work exactly as I wanted to so I inverted the calculation and have it add 10 every 1/100 of a second. That works, at least temporarily until I can find a better way.

    Thank you for your time.

  10. #10
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLC

    Join Date
    Jul 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    example please of value to text
    . everytime i try to take a number and try to display it in a simple text box I get an error that says the value (text input) has to be a text.
    Would not be a big deal if i knew how to display a decimal value in the counter object.
    my ex: i have 4 running totals on a random generator of 4 numbers, 0-3. each number represents a direction i have a line moving on the screen. random number 0 - line goes up, 1 - down, 2 left, 3 right. i built the program with the line in the middle of the screen. every second a random direction is picked. all things being equal after a period of time all positions should have about the same random hits. the Fusion2 program's random generator, with a standard random seed, will do this, or it should. and it does for long periods of time, 15minutes, 54000 sec, 54000 moves. so i took the total moves and divided each of the four direction totals multiplied by 100 to get a percentage of each position with respect to the whole. All worked well until i tried to display the percentage. the counter object doesn;t seem to want to do it. Help.
    Can you not calculate a decimal value on the counter set option; counter - set; position1 / totalpositions * 100, should give me a percentage, but what i get is a zero.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Counters: MMF2 No Decimals, but Android Shows
    By Mikegames in forum Android Export Module Version 2.0
    Replies: 1
    Last Post: 3rd June 2013, 01:12 AM
  2. counters handling decimals
    By harrysgames in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 5th February 2012, 09:21 PM
  3. Don't want decimals.
    By Cossin in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 18th October 2008, 06:42 PM
  4. Decimals In x and Y pos?
    By Dynamite in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 20th December 2007, 12:36 PM
  5. Decimals
    By Mantoid in forum Multimedia Fusion 2 - Technical Support
    Replies: 31
    Last Post: 20th July 2006, 01:31 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
  •