Jump to content

steph Arnott

Resident
  • Posts

    3,914
  • Joined

  • Last visited

Everything posted by steph Arnott

  1. 30% more efficient to what? Even Linden can not explicitly determine what code is and is not more efficient unles it is grossly bad because each server is different. This is an example of fixed laboratory condition data as opposed to actual reality. It is nonsense.
  2. When SL compress the sound file on download it reduces the vol to about 50% of Audacity. At a guess i would say SL converts the file to mono.
  3. Should work. BTW this is not a key it is a string. key sound = "Fountain"; Should be string sound = "Fountain";
  4. The point was that it was meant to be bad. A baseline understanding would have changed it to a simple list load and index find. integer i; for(i=1;i<=llGetNumberOfPrims();++i) { primNames += [llGetLinkName(i)]; } integer LnkIndex = llListFindList(primnames, [the_prim name i want]) + 1;
  5. I already know that. It was written that way deliberatly.
  6. It was written that way on purpose. The word 'crude' was explicit and intended to get the person to study it, understand it and write it better rather than keep getting others to write their entire projects. So far the OP has done nothing except ask/demand As for for not working, it outputs the name of prim and its number if you simply addd a touch call. And to be clear because you appear to want to preen your feathers i would not use a clearly obvious kludge.
  7. Yes. Also sound files are 9.9 seconds max and not ten. llLoopSound(uuid of the sound file, which is clearly shown in the LSL wiki, 1.0); Also you are expected after the amount of posts you have left to ACTUALLY make an effort to write a script rather than keep asking for others to do it for you. This page is for people who want to learn LSL or want find better solutions. I suggest you get very bored and read through the LSL wiki.
  8. //this is a crude example of storing the link numbers for data usage integer gFace = ALL_SIDES; list primData = []; Data(string name) { integer l = llGetNumberOfPrims(); integer i = 1; for(; i<=l;i++) { name = llGetLinkName(i); if( name == "two" ) { if (llListFindList(primData,[name]) == -1) primData = [ name, i ] + primData; } } } default { state_entry() { // // } on_rez(integer start_param) { primData = []; Data("two"); primData = llListSort(primData, 2, TRUE); llOwnerSay( llList2CSV(primData) ); } changed(integer ch) { if(ch&CHANGED_OWNER) llResetScript(); else if(ch&CHANGED_LINK) { primData = []; Data("two"); primData = llListSort(primData, 2, TRUE); } } }
  9. Simple fact is that most just want a script to achieve something. The issue of bloating does start to appear in the mid stage level. It seems to me a case of not understanding the code in the first place. Another issue is that many do not take into account built in function delays. Personally i would rather see ten scripts that just do as written than one which seems to have been kludge together using code that clearly was by different people. An issue i got persuaded into was this stupid idea that scripts should be in a single state and those using multi states are idiots. That i found out after a heck of a lot of issues is total nonsense. Unfortunately when learning one tends to think those doing technobabble know what they are talking about. At the end of the day LSL is not running a bank etc and was only ever intended for agents to create fun things. The world is not going to explode if a green coder writes three hundred lines to move a box 0.1 every time to get a smooth movement from A to B. And it would actually run more efficient than a loop. I know, i did that in the early days and was damned impressed with myself. As for user functions i create them when i have to and not as an excuse to be lazy. But that is my way.
  10. Was you born an abuser? You clearly show signs you are. FYI this is a code forum and you have provided none past any base value.
  11. BTW it was already stated that the count was ZERO in the 'for' block, which you changed. What you added was an extra memory usage line of code.
  12. User created functions should assessed as to memory usage. A function that returns no memory reduction in usage is pointless.
  13. I understood the title and understood this ' i'd like to delete that item from the list. possible? '. Good day.
  14. It stated remove from list. Title of thread 'Delete Item in List'. Good day.
  15. You can not use the first code if the data is already in a list. End of.
  16. Not about being 'picky'. Was about strings and lists. Two entirely different things. Also i could have used ~ rather than == -1 and returned either zero or non-zero.
  17. It will work if the string is evalutaed before being listed. But that was not your post. You can not use that code if it is already in a list.
  18. It does not worlk for a list. Which is what the OP was on about.
  19. ' i'd like to delete that item from the list. possible? ' 'llGetInventoryName' > ' Returns a string '.
  20. This is what you are doing. The data input is not a list at all. The data string is added to a list which is not what your OP was on about. The issue with this is that it can add multiple entries to the list as it converts to lower case. It will also convert the first encounter. The one you do not want. string contents_name = "Freya"; integer null = -1; default { state_entry() { } touch_start(integer total_number) { if (llSubStringIndex (llToLower (contents_name), "freya") == null) { //objectlist += contents_name; } } }
  21. Be odd seeing as you can not convert list to string with that.
  22. Only if you use arrant nonsense like this. if (llSubStringIndex (llToLower (contents_name), "freya" ) == -1) There is no way that would even compile on the main grid. And i doubt it would even on the OS grid.
  23. The first way will take forever. That function should be avoided at all costs and used only when absolutely neccessary. If you want to take 30 seconds as opposed to 1 second then carry on.
  24. That is not doing what was asked. ' item's name (eg. "Freya", or "freya") i'd like to delete that item from the list. possible? ' integer index = llListFindList(temp, ["freya"]; temp = llDeleteSubList(temp, index, index);
  25. This is wrong. Using this function llToLower defeats the literal match. if (llSubStringIndex (llToLower (contents_name), "freya") == -1) It will just add a lower case converted entry. objectlist += contents_name;//list of object names
×
×
  • Create New...