Stacy Aquila wrote:
---------------------------------------------------------------------------------------------------------------------------------
list PussyPrims;list PrimList;key Owner;list DildoPrims;list AssPrims;init() { integer link; for (link = llGetNumberOfPrims(); link >= 1; --link) { if (llSubStringIndex(llGetLinkName(link), "D1") != -1) { DildoPrims += (list)link; } else if (llSubStringIndex(llGetLinkName(link), "D2") != -1) { PussyPrims += (list)link; } else if (llSubStringIndex(llGetLinkName(link), "D3") != -1) { AssPrims += (list)link; } else if (llSubStringIndex(llGetLinkName(link), "") != -1) { PrimList += (list)link; } }} default{ state_entry() { init(); Owner = llGetOwner(); integer NumLink = llGetNumberOfPrims(); llListen(97, "", NULL_KEY, ""); integer i = 0; do { llOwnerSay("Dildo=" + (string)llList2Integer(DildoPrims,i)); llOwnerSay("**bleep**=" + (string)llList2Integer(PussyPrims,i)); llOwnerSay("Ass=" + (string)llList2Integer(AssPrims,i)); llOwnerSay("PrimList=" + (string)llList2Integer(PrimList,i) ); } while ((++i)<NumLink); } listen(integer channel, string name, key id, string msg) { integer a = 0; integer b = 5; string MSG = llToUpper(msg); while(a++ < b); // PROBLEM HERE <<<<<<<<< { if (MSG == "SHOWD1") { llSetLinkAlpha(llList2Integer(DildoPrims,a),1.0, ALL_SIDES); return; } else if (MSG == "HIDED1") { llSetLinkAlpha(llList2Integer(DildoPrims,a),0.0, ALL_SIDES); return; } else if (MSG == "SHOWD2") { llSetLinkAlpha(llList2Integer(PussyPrims,a),1.0, ALL_SIDES); return; } else if (MSG == "HIDED2") { llSetLinkAlpha(llList2Integer(PussyPrims,a),0.0, ALL_SIDES); return; } else if (MSG == "SHOWD3") { llSetLinkAlpha(llList2Integer(AssPrims,a),1.0, ALL_SIDES); return; } else if (MSG == "HIDED3") { llSetLinkAlpha(llList2Integer(AssPrims,a),0.0, ALL_SIDES); return; } } while ((++a)<b); } }
I've pointed out the main problem.....
Your first loop is a null loop. The ';' at the end. And you've got a second loop marker at the end. So your code is only executing once, not multiple times. Perhaps something like this:
listen(integer channel, string name, key id, string msg) { integer a = 0; integer b = 5; string MSG = llToUpper(msg); string test = llGetSubString(MSG,0,0); string test2 = llGetSubString(MSG,-1,-1); list templist; float h; if(test == "S") h = 1.0; else h = 0.0; if(test2 == "1") templist = DildoPrims; else if(test2 == "2") templist = PussyPrims; else if(test3 == "3") templist = AssPrims; else return; for(i=0; i<llGetListLength(templist); ++i) llSetLinkAlpha(llList2Integer(templist,a),h,ALL_SIDES); }