User Tag List

Results 1 to 6 of 6

Thread: newbie Please Help !

  1. #1
    No Products Registered

    Join Date
    Mar 2013
    Location
    NC
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    newbie Please Help !

    trying to make a simple converter, for converting inches to mm. example is you enter the inches in box a and get the result for the mm in box b, easy enough I thought, my problem is I cant get decimals to read, I can get the result using Str$(Edit Value( "inches" )*25.4) however all I get is whole numbers, if I put in 1.5 I get 25.4. I need it to work with decimals up to 4 places cant seem to get it to work I have tried dp calc and have tried this string as well - Val( Edit Value( "inches" )*25.4) but get error that says, mixed string and numbers, any help would be greatly appreciated. Thanks

  2. #2
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform 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)Universal Windows Platform Export Module (Steam)
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,735
    Mentioned
    65 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by Skorpeo View Post
    trying to make a simple converter, for converting inches to mm. example is you enter the inches in box a and get the result for the mm in box b, easy enough I thought, my problem is I cant get decimals to read, I can get the result using Str$(Edit Value( "inches" )*25.4) however all I get is whole numbers, if I put in 1.5 I get 25.4. I need it to work with decimals up to 4 places cant seem to get it to work I have tried dp calc and have tried this string as well - Val( Edit Value( "inches" )*25.4) but get error that says, mixed string and numbers, any help would be greatly appreciated. Thanks
    All numbers are treated as integers by default which is what is causing the issue here. To get around this you simply need to multiply by a decimal (can be 1.0 if you don't want to change the value) in the expression editor.

    Edit Value( "inches" ) * 2.54

    Should do the trick :-) Note that you can retrieve both edit text and numeric value from an edit box. If you are getting the numeric value then there is no need to use val( ) which converts a string to a number.

  3. #3
    No Products Registered

    Join Date
    Mar 2013
    Location
    NC
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Simon still trying lol would upload so someone could take a look but don't know how to do that either lol

  4. #4
    No Products Registered

    Join Date
    Mar 2013
    Location
    NC
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Converter.zip ok figured it out but had to zip it was to large

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Your problem:

    Set text to Str$(Edit Value( "inches" )*25.4)

    the "Edit Value( "inches" )" part is rounding the value. Instead do this:

    Set text to Str$(Val(Edittext$( "inches" ))*25.4)

    By pulling the text from the edit box, it's going to be exactly what you put in there. Then you just use Val() to change the text to a number. Done!

  6. #6
    No Products Registered

    Join Date
    Mar 2013
    Location
    NC
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Konidias, Thank You, Thank You, Thank You, so much I have been trying everything and this worked GREAT Thank You

Similar Threads

  1. newbie needs help
    By amaire13 in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 30th July 2012, 02:47 AM
  2. Newbie Help
    By Banshee in forum Multimedia Fusion 2 - Technical Support
    Replies: 101
    Last Post: 2nd February 2008, 03:34 AM
  3. Newbie help
    By Banshee in forum File Archive
    Replies: 3
    Last Post: 22nd January 2008, 09:32 PM
  4. Newbie needs help.
    By Martin in forum Multimedia Fusion 2 - Technical Support
    Replies: 15
    Last Post: 31st December 2007, 07:38 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
  •