User Tag List

Results 1 to 10 of 10

Thread: Use the string parser to return a number?

  1. #1
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jan 2011
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Use the string parser to return a number?

    Is there a way to tokenize a string but have it return the tokenized pieces as numbers not strings? I need to send the x and y coordinates of an object but I do not know how to get it to return a number.

    EDIT: If it helps, I'm using Lacewing Ver. 18

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

    Re: Use the string parser to return a number?

    Val( >Enter string here< )

  3. #3
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Use the string parser to return a number?

    Binary messages are a better way to send coordinates with Lacewing.

  4. #4
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jan 2011
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Use the string parser to return a number?

    It isn't working for some reason. I'm just setting a counter to an element of the string parser. Also, how do you select an element without using 'Get First Element' or Get Last Element'?

  5. #5
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Use the string parser to return a number?

    listGetAt$("String Parser", <0-based index>)

  6. #6
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jan 2011
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Use the string parser to return a number?

    It is not Working for some reason. I have my events set up like this (this is a test application to get it to work before I implement it into my real application).

    Start of Frame: *list tokenizer Set Source String to edittext$("edit box")

    Start of Frame (the start of frames are combined) *list tokenizer Add Delimiter ","

    Upon pressing Enter: (counter) Set Counter to val(listgetAt$("string parser",1))

    I would like to be able to write in the edit box, let's say, 1,2,3, and have the second value (2) show up on the counter.

    Thanks for the help so far

  7. #7
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Use the string parser to return a number?

    Other way around, I think. Delimiter then source string.

  8. #8
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jan 2011
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Use the string parser to return a number?

    Thanks, but it still doesn't work. Any other suggestions?

  9. #9
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Use the string parser to return a number?

    Well is there anything in the editbox? x)

    You should set the source string to the editbox when the user hits enter

  10. #10
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jan 2011
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Use the string parser to return a number?

    yes. The idea is that I could type a string into the edit box (let's say, '0,1,2,3,4,5') and have the counter display, in this case, 1 using the string parser.

    Tried that too, no good.

Similar Threads

  1. String splitting with string parser
    By Sejez in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 5th February 2013, 05:31 AM
  2. How to return integer as 01 rather than 1 in a string?
    By assentec in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 12th December 2012, 02:52 PM
  3. String Parser 2 limit number of characters
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 8th June 2012, 09:01 PM
  4. Using String Parser to check for any punctuation in a string
    By Apex in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 18th May 2012, 11:03 PM
  5. String Parser or String Parser 2? Vitalized
    By DJ_Wild in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 5th September 2009, 10:12 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
  •