User Tag List

Results 1 to 3 of 3

Thread: Value to String problem

  1. #1
    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)

    Value to String problem

    Hi
    I have a Button a Counter and a List Object in my Application.

    The Counter is set to 'fixed number of digits 2'.
    When i press the button the Counter generates a random number ( 0 -10 ), and that number should be added to the List.

    ...
    Examples of randomly generated numers are:
    01
    05
    10
    07

    But when the numbers are added to the List Object ( by doing 'add Str( Counter )' ), they are displayed as:
    1
    5
    10
    7

    ...
    How can i add numbers in a specific format like ## to a List?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Eliyahu's Avatar
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The problem is that in a counter, those numbers are actually stored as 1,5,10,7. The 0 is just in the display.
    To turn 1,5,10,7 into 01,05,10,07 in your list, instead of adding Str$(number), add this:

    Right$("00"+Str$(number), 2)

    It takes the right 2 characters of your number. For example, if your number is 5, it has "00"+"5", which is "005", and it takes the right two characters, "05"


  3. #3
    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)
    Amazing
    I see, so starting off with the "00" makes the + Str(number) get appended as a string rater than get converted from number to string.
    Anyway, its working
    Thanks

Similar Threads

  1. String Tokenizer Problem in iOS
    By CBSection31 in forum iOS Export Module Version 2.0
    Replies: 2
    Last Post: 2nd December 2014, 11:04 AM
  2. string object color problem
    By droberson in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 5th March 2013, 07:48 PM
  3. [String] Problem :/
    By LittleTinyBabyMan in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 21st July 2012, 07:04 PM
  4. String Parser problem
    By GamesterX23 in forum File Archive
    Replies: 1
    Last Post: 18th June 2010, 08:42 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
  •