User Tag List

Results 1 to 3 of 3

Thread: String parser 2 [2 questions]

  1. #1
    No Products Registered

    Join Date
    Oct 2006
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    String parser 2 [2 questions]

    1. How do i edit an element from an edit-box?
    [example]:

    i got edit-box with this data:
    0,0,0,0,0 (my delimeter is ",")
    i want to change the middle 0 (the 3d element) into 1 so it'll be:
    0,0,1,0,0
    how do i do it with the string parser?
    (i saw a function "set element" but i didnt understand how to use it...

    2. How do i make string parser ignore delimeters?
    [example]:
    i wanna make a chat program that has commands in it (like blizz games) and i wanna make a whisper command -
    /w,[name],[msg]
    if i put "," inside the message it wont send what's after it cuz sp thinks its a delimeter... i dont want to use some wierd symbol for that i wanna use "," as delimeter

    ((/w , cindy , lisen, i wanna go out with you))
    that means that cindy gets a message that looks like this
    "listen"
    i want her to get
    "listen, i wanna go out with you"
    but i also want to use "," in the command /w,[name],[msg]

    thanks for ur help

  2. #2
    No Products Registered

    Join Date
    Aug 2006
    Location
    Westcountry, UK
    Posts
    862
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: String parser 2 [2 questions]

    1) the set element is a rather wierd function because it is executed in an expression. Whenever you want to set an element to a different number say set Global Value A to Global Value A + set element("1",3)

    2)Use an obscure delimiter. I use "<!>". There isn't much else you can do except to replace it before delimiting and then putting it back afterwards.

  3. #3
    No Products Registered

    Join Date
    Oct 2006
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: String parser 2 [2 questions]

    about question 1,
    i got it right, i just did some stupid mistake, it workes fine now...
    I also think u got it wrong, i wanted to save the whole string not just changing a number, so the right way to do it is:
    1. set source string("String-Parser2")= "0,0,0,0,0"
    2. set text("Edit-box")= set element("String-parser2","1",3)

    that should give the Edit box the whole string with the element fixed..

    about question 2,
    using a commands for a whisper chat message with "<!> delimeter doesnt look so smart to me after all cuz players wont like using the command that way (/w<!>name<!>msg) ... i can solve this in 2 ways:
    1.capturing the whole string, count the first 2 elements's chars and then putting the whole string using mid(,,,) command to preview only the 3d element without using string parser.
    (that would be Blizzard way in the games: starcraft,diablo2 and warcraft3)

    2.i can use an Edit-box so the player will just write the other player's name, and then all the messages will be sent to that playey as whisper (that would be MU-Online way of whispering)

    but thanks for your help anyway

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. 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
  3. 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
  4. String Parser and MD5?
    By pinacoladaxb in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 19th July 2008, 05:03 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
  •