User Tag List

Results 1 to 5 of 5

Thread: Just quick question about the strings.

  1. #1
    Clicker Fusion 2.5 Developer

    Join Date
    Sep 2020
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Just quick question about the strings.

    So, I have for example String$("String") Is it possible to do something like placing another string inside the brackets?

    It could theoretically look something like String$( String$( "String" ))

    Is it possible to do?

  2. #2
    Clicker Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jan 2015
    Location
    Australia
    Posts
    229
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    String$() is for converting a number into a string - if something is already a string, then String$() won't work on it

    String$(5) will give you the string "5", but String$("hello") will give you an error in the expression editor

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    Sep 2020
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay I think I get it now, thank you marbenx for explaining this to me. Much appreciated.

  4. #4
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    Phi's Avatar
    Join Date
    Jan 2010
    Location
    England
    Posts
    1,960
    Mentioned
    25 Post(s)
    Tagged
    0 Thread(s)
    It's Str$(number), not String$(number).
    String$() reads the displayed alterable string from a String Object.
    You can nest expressions, but for something like String$("String Object Name"), there's no way to inject any nesting.

    But if you wanted to do something nested, like find if what the user typed in an Editbox Object was one of the lines in a List Object, you would use:
    Add new condition
    > System object (two gear icon) -> Compare two general values

    And in top box of Compare Two General Values, add expression:
    > List object -> Find String Exact



    ...where you are given two parameters to put in, and you can put in
    > EditBox -> Get Text
    and 0 to start from first line in list.


    FindStringExact$() will return a line number where the text after list object name was found, or -1 if it can't find the line number that the text is on.
    So the dropdown can just be Different, second box -1, which means the condition will be true whenever the line index is not -1, so the item is in the list.
    Images attachées Images attachées

  5. #5
    Clicker Fusion 2.5 Developer

    Join Date
    Sep 2020
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you Phi, very useful info and clearly explained. I have definitely learned something new today. Thanks once again!

Similar Threads

  1. Question about strings
    By Angry_Dwarf in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 25th December 2013, 04:36 AM
  2. question about alterable strings
    By Gustavo in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 25th February 2012, 11:27 PM
  3. question about writing strings
    By Gustavo in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 26th January 2012, 04:47 PM
  4. A very quick question about strings
    By pikzilla in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 7th December 2011, 11:44 PM
  5. Quick Global Values/Strings Question
    By CBSection31 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 28th August 2010, 12:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •