Jump to content

Alec Walsh

Resident
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Alec Walsh

  1. That worked perfect!! Learn something new every day. Many thanks for the assist.
  2. Hello, I have been scripting in SL for many years, but tonight I came across an issue that I have never seen before, and one that is baffling me beyond belief. I figured I would try to reach out in here to find a solution. I have an external device that I bought, which I am trying to make a score card for. The object states "Alec Walsh got a hole in one!". I have listened, and captured that text through a listener, storing it in a variable called message. I even had the LSL say message to confirm that it has heard the message, (code below) which it has. I also check the name, which I am picking up when the user clicks reset on the hud I have built - and have confirmed that the name is accurate. Now, if it listens to the text from the other object, the user name is underlined, and linked to a profile, and when I compare it to the name I have in the string, it fails. However, if I copy that message text, then paste it outside of SL, copy it again, bring it back in, thus removing the profile link, the compare works, and the script works as expected. My question, is there a way for either a) use LSL to convert the message string to a true string with no links to a profile, or b) to compare the string to a true string, and have LSL recognize that they are equal. Problem is, I need the persons name from the text spoken by the object to know whose score I am keeping. Many Thanks for any help!! Debug and actual text sample // message is :"Alec Walsh got a hole in one!" // Actual_name is :Alec Walsh (Checked all spaces etc) llSay(0,Actual_name); // Check Name llSay(0,message); // Check message - confirm name is in message spaceIndex = llSubStringIndex(message, Actual_name); llSay(0,(string)spaceIndex); // SpaceIndex keeps coming back as -1 when listening to the object talk, but with a value when I paste the exact same text. if(spaceIndex != -1) // Fail - this should pass, but fails when the object gives the message, but if I paste the same message, it works.
×
×
  • Create New...