Jump to content

ainst Composer
 Share

You are about to reply to a thread that has been inactive for 1913 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

1 hour ago, Kyrah Abattoir said:

I don't see how anything is going to run more efficiently if you where to sort keys. Sorting a list is slow.


if ( !~llListFindList( lAllAvs, [ llDetectedName(i) ] ) )

Is already guarding against duplicate insertion.

Good point, but for a novice scripter the "!_" is a bit confusing, it might be clearer to them to use the == -1 instead.

 

For the OP - I did run a visitor tracker like this for a while using a list of avatars. If you have a busy sim it becomes vital to keep monitoring the free memory in the script and when it gets low, dump the list and reset it to zero, otherwise the script will fail silently with no memory left. Check the wiki for the functions in the wiki for free memory and used memory, and also make sure your script is in mono, not LSL, as you get four times as much memory with mono.

Edited by Profaitchikenz Haiku
Link to comment
Share on other sites

3 minutes ago, Profaitchikenz Haiku said:

For the OP - I did run a visitor tracker like this for a while using a list of avatars. If you have a busy sim it becomes vital to keep monitoring the free memory in the script and when it gets low, dump the list and reset it to zero, otherwise the script will fail silently with no memory left. Check the wiki for the functions in the wiki for free memory and used memory, and also make sure your script is in mono, not LSL, as you get four times as much memory with mono.

The distinction in this case is that the OP is not writing a visitor tracker.  The OP's device simply says hello and sends an annoying message to the script owner.  It's not designed to save a list of visitors.  The list is erased deliberately when there's nobody within sensor range.  As I noted earlier, this means that unless the OP intends to put his device in a very busy area, there's no reason to worry about overloading the list and stalling the script.  Parenthetically, this also means that there's no good reason to sort the list either.  Nobody, including the owner, ever sees the list, so it doesn't need to be alphabetized for human convenience, and any minor efficiency advantage (if there really was any, with llListSort's bubble sorting algorithm) is too tiny to be worth worrying about.  This is basically a chatty doormat.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1913 days.

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
 Share

×
×
  • Create New...