Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Why is llDetectedGroup ignored in this script?

Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
08-23-2009 09:23
This is a curiosity....... A shop I visit occasionally offers freebies to group members, but I have always been able to get the free gift, even if I forget to activate the group tag. (I'm not trying to cheat -- honest. I am always wearing an active tag; it's just for another group, and I have a mind like a seive. :p ) By chance, I happened to get a copy of the vendor script, which is very simple. I can't see why it would allow a non-group member to get a freebie. Can you?

CODE

default
{
touch_start(integer total_number)
{
integer number = 0;
do
{
if (llDetectedGroup(number))
llGiveInventory(llDetectedKey(number), llGetInventoryName(INVENTORY_OBJECT,0));
else
llSay(0, "Wrong active group!");
}while(total_number > ++number);
}
}
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask.... ;)

Look for my work in XStreetSL at
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
08-23-2009 09:46
Looks like the same code from http://wiki.secondlife.com/wiki/LlDetectedGroup.

I don't see any problem with it. How long has this been happening?
_____________________
Sick of sims locking up every time somebody TPs in? Vote for SVC-3895!!!
- Go here: https://jira.secondlife.com/browse/SVC-3895
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
08-23-2009 10:40
At least a couple of weeks, probably longer. I wasn't even paying attention until someone pointed out that I had to be wearing the group tag to get the freebie ..... and I had been getting freebies on several previous visits and had never thought about the tag before. I just went back this morning to check .... and got the freebie again without the tag.

It worries me because I use llDetectedGroup a fair amount and have never had a reason not to trust it before now.
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask.... ;)

Look for my work in XStreetSL at
Nika Talaj
now you see her ...
Join date: 2 Jan 2007
Posts: 5,449
08-23-2009 10:47
Are you sure that the giving object still has its own group set correctly?
.
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
08-23-2009 11:03
Are you SURE that is the script in the giver?

That one appears to work just fine.
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
08-23-2009 13:42
If the object's own group isn't set properly, it should still refuse to give ME a freebie unless MY group is set to whatever it's group is. (Unless, of course, both of us are set to NO group. That's not the case, though, since I never set my own tag to NO group.)

No, I can't be confident that this is the script they are using, but I'm 90% sure. They accidentally included it along with the freebies for a week, so it was evidently in the vendor's contents. That's a good thing to check, though. I just didn't want to alarm the shop owner until I had exhausted other possibilities.

Still a puzzle.....
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask.... ;)

Look for my work in XStreetSL at
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
08-23-2009 15:09
it's possible that the version they have in the giver has been modified. a simple modification might be to add a list of previous validated users, and allow them if they are found in the list. (or it could be that the script they are using is borked in some other way like the addition of a direct comparison that actually being done as an assignment)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
08-23-2009 15:36
From: Void Singer
it's possible that the version they have in the giver has been modified..

/me guesses this is right. I've also recently done some group-only code for a in-sim tp system and it works as-advertised..
_____________________
Sick of sims locking up every time somebody TPs in? Vote for SVC-3895!!!
- Go here: https://jira.secondlife.com/browse/SVC-3895
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
08-23-2009 16:25
OK.... thanks, team. I'm glad to hear there isn't some odd feature of llDetectedGroup that I had been overlooking. If it's just their implimentation that's somehow borked, I can live with that. One less group tag to remember to wear.... :p
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask.... ;)

Look for my work in XStreetSL at