|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
08-08-2006 19:45
I would put this on the Scripting Tips forum, but I REALLY need a definitive answer on this and (begging your pardon) cannot go on the word of my fellow players.
1.) What happens when multiple scripts within the same prim (in their current states) all implement a 'money()' event handler? Are multiple handlers invoked for a single payment, or only one? If only one, WHICH one?
2.) What happens when multiple scripts within the same OBJECT (in their current states) all implement a 'money()' event handler? Are multiple handlers invoked for a single payment, or only one? If only one, WHICH one?
3.) Can multiple scripts per prim all acquire the PERMISSION_DEBIT permission at the same time? What about multiple scripts per object?
This is very important because, if the object has to refund money, it would be disasterous for more than one script to refund the money! [EDIT: That's not the ONLY reason these answes are important, though. For example, I am setting up an object that uses one prim per user--up to a fixed limit--to store the amounts owed in the persistent description, but the main script still needs to be able to refund money if an illegal payment is made in the first place.]
While I am at it, is there a definitive reference document we can go to for LSL? So far the Wiki and the forums are the best I have found. I have seen people refer to other documentation, but have never actually seen a reference or a link (aside from the one-line hovertext in the script editor).
Thank you very much for your consideration.
|
|
Torley Linden
Enlightenment!
Join date: 15 Sep 2004
Posts: 16,530
|
08-10-2006 11:03
Hi Hewee, I'm asking about this... and the best reference we have for scripting in Second Life is the LSL Wiki which you already know about. If you hear someone refer to someone else, ask them where they mean. 
|
|
Torley Linden
Enlightenment!
Join date: 15 Sep 2004
Posts: 16,530
|
08-11-2006 14:11
[UPDATE] Gattz Gilman--thanx Gattz!--wanted me to share the following. I'll move this into Scripting Tips too. From: Gattz Gilman /54/fc/128218/1.html 1.)Both money() events are triggered. 2.)For all child prim with script, they are triggered if payment is made to that prim. For parent prim, is triggered when paying to the parent prim or all non money() event scripts in other child prims. 3.)Each script has to ask for permission. Easy way to test this is make 3 prims and link them. In the parent prim, make 2 scripts. default { money(key id, integer amount) { llOwnerSay("Parent Prim Paid"); } } default { money(key id, integer amount) { llOwnerSay("Parent Prim Paid[2]"); } } then in one of the child prims put this script in default { money(key id, integer amount) { llOwnerSay("Child Prim Paid"); } } then try paying into each prim. When you pay into the parent prim you will get these messages: Parent Prim Paid Parent Prim Paid[2] when paying into the child prim with the script, you will get this message: Child Prim Paid And when you pay into the child prim with no script you will get these messages: Parent Prim Paid Parent Prim Paid[2]
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
08-11-2006 15:19
All right. Thanks. But actually what I was really hoping for was a definitive definition, not experimantal evidence. The former doens't change with possible updates (if it does it is technically a defect in the LSL implementation). The latter cannot be relied upon and may change at the whim of the developers.
|