Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llGetParcelPrimOwners Bug, I will paid for work around

Seann Sands
Registered User
Join date: 8 Mar 2007
Posts: 49
09-05-2007 19:38
Hello all,

Well I've tried and tried to do a work around for the Bug (See: https://jira.secondlife.com/browse/SVC-25) currently happening on llGetParcelPrimOwners which pretty much effects every prim counter I've tested when used on Group land and deed to that group AND the owner logs off of SL...making the script stop working for any other group member when the owner is offline.

SO, my questions is: what is the work around? I know one exists..since I know that one of the prim counters on SLX is still working (LogSpark Prim Meter)...but, it's WAY too much for me to pay per package for the amount of counters I need. Plus, I know I can create it myself...with a little help. SO, anyone? Any clues? I willing to pay too...for a working copyable version...not tons of money now...since I can do some of the scripting myself...just can't seem to think of a work around for this.

Oh Btw, the following script I got does in fact work all the time (even when deeded to the group and owner is offline) but, it's keyed...and not available for anyone who touches it. I need one that works for all group members who touch it. But, a 'shared' prim count option to it would be great...for those shared renter situations. A combo counter would be a great idea for Landlords I know! So, let me know if anyone has any ideas how to make the following script into a super combo shared WORKING prim counter script! :)

Thanks!

<php>

list gAvatars = ["add9605f-301e-446a-b4bd-bbaa87a02018" , "dfe6e1f5-3706-43d4-b9df-5fd5f58cf93c"];

integer GetPrimCount(key id, list PrimOwners) {
integer ReturnVal = -1;
integer i;
integer NumEntries = (PrimOwners != []);

for(i = 0; i < NumEntries; i += 2)
if(llList2Key(PrimOwners, i) == id)
return llList2Integer(PrimOwners, ++i);
return 0;
}

default {
on_rez(integer args) {
llResetScript();
}

touch_start(integer numdet) {
list PrimOwners = llGetParcelPrimOwners(llGetPos());

integer PrimCount = 0;

integer i;
integer NumberAvatars = (gAvatars != []);

for(i = 0; i < NumberAvatars; ++i) {
PrimCount += GetPrimCount( llList2Key(gAvatars, i), PrimOwners);
}

for(i = 0; i < numdet; ++i) {
llInstantMessage(llDetectedKey(i), "You have a combined total of " + (string) PrimCount + " prims on this parcel";);
}
}
}

</php>
Jotheph Nemeth
Registered User
Join date: 9 Aug 2007
Posts: 142
09-05-2007 20:33
" I need one that works for all group members who touch it. "

The simplest way to do this is to use llSameGroup(avatar);

http://www.lslwiki.net/lslwiki/wakka.php?wakka=llSameGroup

The drawback to this is that the avatar has to have the current active group the same as the object's active group.

I changed your touch_start routine so that if the avatar is in the same group as the object's group, it will add the id to the list of keys before it does the counts.

touch_start(integer numdet) {
list PrimOwners = llGetParcelPrimOwners(llGetPos());

integer PrimCount = 0;
integer i;

key id = llDetectedKey(id);
if (llSameGroup(id)) {
if (llListFindList(gAvatars, [id]) < 0) {
gAvatars = [] + gAvatars + [id];
}
}

integer NumberAvatars = (gAvatars != []);

for(i = 0; i < NumberAvatars; ++i) {
PrimCount += GetPrimCount( llList2Key(gAvatars, i), PrimOwners);
}


Hope this is what you're looking for.
Seann Sands
Registered User
Join date: 8 Mar 2007
Posts: 49
Thanks...one thing...
09-05-2007 22:22
Jotheph,

First of all, thank you for your reply! I appreciate it.

I changed the touch_start routine with yours...but, it gives an "ERROR: name not defined within the scope" when compiling it. Any ideas? Thanks! I'm sure it's something simple I'm missing....thanks.
RJ Source
Green Sky Labs
Join date: 10 Jan 2007
Posts: 272
09-06-2007 06:45
Try changing:

key id = llDetectedKey(id);

To:

key id = llDetectedKey(0);
Seann Sands
Registered User
Join date: 8 Mar 2007
Posts: 49
thanks. Works!
09-06-2007 09:06
Thanks. Works now with that change! Appreciate you help!
Jotheph Nemeth
Registered User
Join date: 9 Aug 2007
Posts: 142
09-06-2007 14:27
From: RJ Source
Try changing:

key id = llDetectedKey(id);

To:

key id = llDetectedKey(0);


Whoops, my bad.

Sorry about that.
Seann Sands
Registered User
Join date: 8 Mar 2007
Posts: 49
One More thing...
09-06-2007 16:55
So, this shared counter works fine for everyone on group land in the group...with one exception. The owner of the group. I think what's happening is it's counting the group owned object as the owner's numbers...not his/hers real prim count. Any one know how to go around that one exception? Thanks!
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
09-07-2007 05:20
From: Seann Sands
I think what's happening is it's counting the group owned object as the owner's numbers...not his/hers real prim count.
At least in my experience with this function, a group-owned object will be counted with the key of the group itself as its owner.

There's still some mystery lurking here (possibly related to how the group or land is set up?). I've somehow never had the jira-reported problems using llGetParcelPrimOwners in a group-deeded object on group-owned land, even with all "Owner-roled" group members offline. But I don't know if that's somehow because of my script, the groups, or the parcels on which I've used the function.
Seann Sands
Registered User
Join date: 8 Mar 2007
Posts: 49
Island verse Mainland?
09-07-2007 10:18
Thanks Qie.

I'm curious...if your group land is on a Island parcel or Mainland? I have heard that maybe the servers on the Islands are not having this issue...only the mainland. I can't confirm it...since I only own on the mainland. Curious. Thanks.