User Tag List

Results 1 to 3 of 3

Thread: Find String in String issues

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export Module
    DistantJ's Avatar
    Join Date
    Jan 2008
    Location
    Gloucester, UK
    Posts
    2,144
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Find String in String issues

    Something which could have easily been overlooked, but I just spotted it, something appears wrong with the string comparison system. Here's what I have:

    When a specific item in the frame (one per frame) is collected, the global string "Collected" is set to Collected+":itm"+Str$(frame)+":"

    So for example, "Collected" may appear as ":itm1::itm2::itm3:" if the first three have been collected.

    Then, it destroys the object when revisiting the frame if Find(Collected, "itm"+Str$(frame)+":", 0) <> -1.

    This works on PC and iOS, if the item for that particular frame has been collected, it will not be present when you revisit that frame. However, on Android, the item is always destroyed. Therefore I think that the Java function which corresponds to the Find String in String expression must return a different value to -1 if the string isn't found. Perhaps it returns 0 and that hasn't been changed to -1 for the MMF side?

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I just copied that expression from the Java runtime - it looks like it does return 0 if the string you're searching for is longer than the string you're searching in, which I've now fixed. Could that have been the problem?

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export Module
    DistantJ's Avatar
    Join Date
    Jan 2008
    Location
    Gloucester, UK
    Posts
    2,144
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    longer than the string you're searching in... Actually that would make perfect sense, because to begin with the string is empty, so it will be looking for "itm"+Str$(frame)+":" inside of "" so yeah, it'll be a smaller string than what I'm searching for. But you say you've fixed it?

    I'll add + Collected <> "" to the event as a workaround to try and confirm that this is what's causing it. Back after testing!

Similar Threads

  1. find string in string
    By Sevennemesis in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 13th October 2012, 07:07 AM
  2. find string
    By daniele in forum File Archive
    Replies: 0
    Last Post: 8th September 2011, 08:29 PM
  3. Help Find string
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 6th December 2009, 02:57 PM
  4. Where to find string.mfx?
    By DJ_Wild in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 22nd November 2007, 10:20 AM
  5. Where i can find string.cox ?
    By lorddongle in forum Extension Development
    Replies: 7
    Last Post: 22nd March 2007, 10:44 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
  •