Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Can llRequestPermissions and llGiveMoney be in two different scripts?

Edison Swain
Registered User
Join date: 7 Dec 2006
Posts: 51
01-12-2007 11:12
Hi all,

Due to the length of the script I am writing, I have had to split it up into multiple scripts residing in the same prim.

I want to know - if llRequestPermissions is called in one script that resides in that prim, to grant the PERMISSION_DEBIT, can the other scripts in that prim make a successful llGiveMoney call?

Basically, is the PERMISSION_DEBIT that is granted based on the prim as a whole, or is it just local to the script it is called from?

How about linked prims? If llRequestPermissions is called in a script in the root prim, can llGiveMoney be called from a script in a child prim?

Any catches that I should be concerned about doing things this way?

Thanks!
Jacques Groshomme
Registered User
Join date: 16 Mar 2005
Posts: 355
01-12-2007 11:37
Permissions are granted on script-level. In other words, you must have llRequestPermissions() and llGiveMoney() in the same script.


From: LSL Wiki

llRequestPermissions
Ask agent to allow the script to do perm
Edison Swain
Registered User
Join date: 7 Dec 2006
Posts: 51
01-12-2007 13:03
From: Jacques Groshomme
Permissions are granted on script-level. In other words, you must have llRequestPermissions() and llGiveMoney() in the same script.


That's unfortunate, but still workable. I guess it simply means I'll have to answer multiple llRequestPermissions calls at object restart - one for each script that needs it.

Thanks for the help!
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
01-12-2007 13:08
I think it's fortunate, because otherwise it would probably open up security holes. But from other points of view it's unfortunate.

I suggest you collect all payments into one script module and have that module offer services to the other modules. That way the user doesn't have to answer the payment authorization more than once.