User Tag List

Results 1 to 4 of 4

Thread: Taking 3 counters and making them one single number?

  1. #1
    No Products Registered

    Join Date
    Jul 2015
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Taking 3 counters and making them one single number?

    I have 3 counters, Digit1 Digit2 and Digit3. I want to combined all 3 digits into one number without adding them together.

    For example if Digit1= 3 and Digit2= 1 and Digit3= 6 I would want the number displayed as 316.

    I have tried: value( "Digit1" ) and value( "Digit2" ) and value( "Digit3" ) without success.

    Appreciate any help, thanks

  2. #2
    Clicker

    Fusion 2.5Android Export Module

    Join Date
    Jan 2007
    Posts
    281
    Mentioned
    8 Post(s)
    Tagged
    1 Thread(s)
    There are two ways to do this.

    First with another counter object.

    Always
    - set counter to digit1 * 100 + digit2 *10 + digit3

    Another way would be using a string.

    Always
    - set string to Str$("digit1") + Str$ ("digit2") + Str$("digit3")

  3. #3
    No Products Registered

    Join Date
    Jul 2015
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When I try to set the string to Str$("digit1") + Str$ ("digit2") + Str$("digit3") it says error "mixed strings and numbers"

    first option worked though, thanks

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS 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)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,367
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    You have the expression wrong. Here's the correct one: Str$(value("Digit1")) + Str$(value("Digit2")) + Str$(value( "Digit3" ))

    If you're trying to set the value to a counter, you'll need to wrap it inside val() like this: val(str$(value( "Digit1" ))+str$(value( "Digit2" ))+str$(value( "Digit3" )))

Similar Threads

  1. FlagPacker Widget (store up to 29 flags in a single number)
    By SoftWarewolf in forum Guides, Tutorials, Examples, Widgets
    Replies: 1
    Last Post: 14th July 2015, 09:06 AM
  2. change graphic of multiple number counters?
    By StingRay in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 18th October 2013, 12:31 PM
  3. 5 Counters higest number wins?
    By warlords in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 1st May 2013, 06:38 PM
  4. Custom Parameter - making it a number?
    By Dines in forum Extension Development
    Replies: 0
    Last Post: 21st May 2010, 12:24 PM
  5. X and Y to Single number and reverse
    By Plooscva in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 20th January 2007, 02:43 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
  •