ChaosRaine Posted January 27, 2019 Share Posted January 27, 2019 I have a script listening to a chat channel. When it hears a word it checks the list for the word. If it's not already on the list, it adds it. I'm having trouble checking the list for the word. Here's what I am doing. Quote integer MC = 0; integer Done = llGetListLength(Liked); for (; MC<Done; ++MC) { if (llList2String(Liked, MC) != (string)Match) { llListenRemove(listener); Matches += Match; Matches += ","; ++mm; llSetText((string)xx + " Likes \n" + (string)mm + " Matches", ZERO_VECTOR, 1); listener = llListen(MatchChannel,"",NULL_KEY,""); } else { } } Link to comment Share on other sites More sharing options...
Xiija Posted January 28, 2019 Share Posted January 28, 2019 something like... list liked = ["one", "Two", "three"]; default { state_entry() { llListen(10, "","", ""); } listen( integer channel, string name, key id, string message ) { if(message) { if (!~llListFindList(liked,[message])) { llOwnerSay("adding *" + message + "* to list..."); liked += message; } else { llOwnerSay("already on list..."); } } } } 1 Link to comment Share on other sites More sharing options...
ChaosRaine Posted January 28, 2019 Author Share Posted January 28, 2019 OMG thank you so much works great! I was tweaking all over the place and just couldn't get it. Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now