|
Suzhanna Rossini
Shopaholic
Join date: 2 Apr 2007
Posts: 109
|
01-09-2008 05:58
I'm quite confused by the usage of llGetInventoryPermMask..
Basically, I need to check a certain inventory asset to NOT have copy or mod permissions set, so if the asset has neither copy nor mod set, I want to go on, if any of them are set, just skip ahead.
_____________________
When I'm hot, I'm cooking - When I'm not, I'm a bitch..
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
01-09-2008 09:42
Depending what the loop or conditional looks like now, there may be a prettier way to do this but logically I think what's wanted is something like:
// [BEWARE: COMPLETELY UNTESTED]
if (! (llGetInventoryPermMask(theAsset, MASK_OWNER) & (PERM_MODIFY | PERM_COPY))) // "go on" else // "skip ahead"
or instead of MASK_OWNER, whichever set of permissions you're trying to determine.
|
|
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
|
01-09-2008 10:41
Yes, that will work, though one might as well reverse the positions of "go on" and "skip ahead" and not use the ! operator.
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!
http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal
http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
|