Results 1 to 4 of 4

Thread: What am I doing wrong?

  1. #1

    Thread Starter
    Member Shenron's Avatar
    Join Date
    Mar 2002
    Posts
    33

    Question What am I doing wrong?

    VB Code:
    1. DisplayText = "/me plays *AR - *SN"
    2. Replace DisplayText, "*AR", MP3.Artist
    3. Replace DisplayText, "*SN", MP3.Title
    4. Replace DisplayText, "*AL", MP3.Album

    DisplayText still returns "/me plays *AR - *SN", all MP3 varibles have the correct text in them. *sighs* - I don't see what I'm dong wrong...

  2. #2
    Frenzied Member PilgrimPete's Avatar
    Join Date
    Feb 2002
    Posts
    1,313
    Replace returns the altered string as a return parameter, the original string is passed ByVal
    VB Code:
    1. DisplayText = "/me plays *AR - *SN"
    2. DisplayText = Replace(DisplayText, "*AR", MP3.Artist)
    3. DisplayText = Replace(DisplayText, "*SN", MP3.Title)
    4. DisplayText = Replace(DisplayText, "*AL", MP3.Album)

  3. #3
    Swatty
    Guest
    To start with , wrong is a subject whats wrong or help or .... whatever don't apply to a good subject.

    The replace function does return something. (a string)
    if you don't capture it , and store it somewhere then it is lost.

    If you want to replace the *AL bit you must provide it to replace.

    try to add msgbox before it you'll see it.

  4. #4

    Thread Starter
    Member Shenron's Avatar
    Join Date
    Mar 2002
    Posts
    33
    Ah.. thankyou. I feel stupid now...

Posting Permissions

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



Click Here to Expand Forum to Full Width