User Tag List

Results 1 to 8 of 8

Thread: moltiplied two decimal value from edit box, is possible?

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleXNA Export Module
    daniele's Avatar
    Join Date
    Nov 2007
    Location
    italy
    Posts
    413
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    moltiplied two decimal value from edit box, is possible?

    you can have a decimal value with the counter?
    I have two values ​​taken from two edit box
    the first has a value of 13000
    the second has a value of 0.2365
    If I add a counter to the value of the first number multiplied by the value of the second, the result is zero because the only 'action should multiply and multiply 13000x 0 and not 13000x0, 2365
    how can I do?
    Regards

  2. #2
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Just never use the "get numeric value" expression.

    Bad: Edit Value( "Edit Box" )
    Good: Val(Edittext$( "Edit Box" ))

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleXNA Export Module
    daniele's Avatar
    Join Date
    Nov 2007
    Location
    italy
    Posts
    413
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    thanks a lot.. work fine

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleXNA Export Module
    daniele's Avatar
    Join Date
    Nov 2007
    Location
    italy
    Posts
    413
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    NO!!! I still have a problem. I tried to do a simple operation on a counter.
    every second...add to counter 75/1000 , but this istruction does not work when it should generate as a result of 13.33333 ...

    how do I get a decimal number with the division.
    if I do a multiplication result has a comma, and if I am going to share with zero, the counter does not mark anything.

    if I have this formula instead of result, but without values ​​decimal
    every second...add to counter 75x13.5 is work

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleXNA Export Module
    daniele's Avatar
    Join Date
    Nov 2007
    Location
    italy
    Posts
    413
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    INCREDIBLE... work if add to final numer (.0) why??
    only second, add to counter 75/1000.0 is correct
    only second, add to counter 75/1000 NOT CORRECT Why???

  6. #6
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    75.0/1000

    You have to introduce a decimal number in the equation, if not MMF2 ( expression editor? ) does not return a decimal number ( but rather treats it like an integer? )
    It can be troubblesome when working with big or complicated equations/ calculations wich require a decimal output, but its just the way it is

  7. #7
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Jaffob's Avatar
    Join Date
    May 2008
    Location
    USA
    Posts
    1,833
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, MMF2 treats numbers as integers (without a decimal) until it finds one explicitly defined with a decimal. This means that a calculation done on two integers will result in an integer.

    To convert values that you retrieve from an expression to a floating-point value, the easiest way is to multiply by 1.0.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleXNA Export Module
    daniele's Avatar
    Join Date
    Nov 2007
    Location
    italy
    Posts
    413
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    that's great, now I understand this too. every now and then I saw in several examples and tutorials, a number like this at the end (100.0), but I did not understand. I tried in my education and ow it works well. Thanks for your help

Similar Threads

  1. iOS Edit Box (and normal edit box) not showing up on Device
    By xhedgehogx in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 23rd March 2012, 09:02 AM
  2. hex to decimal??
    By Gibbon in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 24th June 2009, 03:05 PM
  3. Decimal place in Edit box?
    By billv in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 29th March 2009, 11:48 PM
  4. Extracting a line from Rich Edit Object or Edit Ob
    By Tiles in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 8th March 2008, 05:16 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
  •