Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llGetInventoryPermMask() Help...

Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
01-22-2007 18:56
For the life of me...I can't figure how to make this simple function work...so I thought I'd ask on the boards...

GOAL: To detect if an object put into another object's inventory has Modify Permissions in any available combination.

Script:

CODE

if....(unrelated test that works out fine)
else if(llGetInventoryPermMask(note, MASK_NEXT) == PERM_ALL) return(sfp);
else if(llGetInventoryPermMask(note, MASK_NEXT) == PERM_MODIFY | PERM_COPY) return(sfp);
else if(llGetInventoryPermMask(note, MASK_NEXT) == PERM_MODIFY | PERM_TRANSFER) return(sfp);


I've also tried

CODE

else if(llGetInventoryPermMask(note, MASK_NEXT) == PERM_ALL) return(sfp);
else if(llGetInventoryPermMask(note, MASK_NEXT) == PERM_MODIFY) return(sfp);


The PERM_ALL variant always works...

...but I can never get the script to detect correctly if a mod/copy or mod/trans version of an object is put into the scripted holder-object.

Some help?
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
01-22-2007 20:09
llGetInventoryPermMask is similar to llGetObjectPermMask (they work the same).

Take a look at the sample on:
http://rpgstats.com/wiki/index.php?title=LlGetObjectPermMask

You should read up on bit masks and bit fields.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
01-22-2007 20:31
Thank you. Seems the current WIKI up has a better example than the normal WIKI (which had no examples). And yes, I don't generally work with bit maps and bit fields...and I should read up on it.
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.