User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 19 of 19

Thread: Cannot get percentage?

  1. #11
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Cannot get percentage?

    Isn't there a length limiting feature (len() or something?)

  2. #12
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Tuna's Avatar
    Join Date
    Feb 2008
    Location
    Central Texas
    Posts
    1,853
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Cannot get percentage?

    The problem with using len() is that in some cases, the result is actually a "whole" number. Using left$() and len() would then give bad results.

    I've opted to go ahead and use floor() because it's the closest thing to what I need.

  3. #13
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Tuna's Avatar
    Join Date
    Feb 2008
    Location
    Central Texas
    Posts
    1,853
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Cannot get percentage?

    Actually, this morning I realized that the easiest way to do this is to use the counter object and set the number of digits to the right of the decimal to 2.

    So, ommit floor() and do:

    value("a")*100.0/value("b")

    where a = 1 and b = 3 then the counter shows 33.33

  4. #14
    No Products Registered

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    1,141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Cannot get percentage?

    If you want to use a string you can use FloatToString$ instead of str$. I don't remember exactly what the parameters was but you can limit the number of decimals with it.

  5. #15
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Tuna's Avatar
    Join Date
    Feb 2008
    Location
    Central Texas
    Posts
    1,853
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Cannot get percentage?

    good suggestion... although for my needs, i actually prefer the use of the counter, i'm already using counter controls for Hits and Tries counter, so this implementation is doing great. Thanks!

  6. #16
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Cannot get percentage?

    Ins't Len() for getting the length of a string??
    Working as fast as I can on Fusion 3

  7. #17
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Cannot get percentage?

    Yes?

  8. #18
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Cannot get percentage?

    Then this post and this post don't make sense.
    Working as fast as I can on Fusion 3

  9. #19
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Tuna's Avatar
    Join Date
    Feb 2008
    Location
    Central Texas
    Posts
    1,853
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Cannot get percentage?

    LB: if you convert the value to a string then get the length, it is conceivable that one could attempt to use left() to try and truncate digits on the right. Is this a good choice? Clearly, No. Using left() and len() against numbers wont end up working.

    I hope this clears up what UPRISE was suggesting, and what i commented on, but this was never a consideration for my needs.

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. How to get the percentage of two counters?
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 4th April 2012, 06:09 PM
  2. Percentage of Counter
    By Jdsfrog in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 25th October 2008, 03:14 PM
  3. Percentage Question
    By scdlsam in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 22nd April 2007, 04:05 PM
  4. Percentage
    By dingdong in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 13th December 2006, 06:57 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
  •