Difference between revisions of "Talk:LlGiveMoney"
m |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
Strife, when you edited my comment you noted (in history) that there was no evidence that this function should return a boolean value. I beg to differ, the function definition here on the wiki states that the return value is an integer and that it always returns 0. I think this function should be revised and the return value put to use - it should either a) return the amount of LS that was actually given or b) return 0 for transaction failure / return 1 for transaction success. How do our scripts know if llGiveMoney failed? Example: My script tries to give an avatar 10LS, but my account is at 0LS - how do we deal with this? --[[User:Nulflux Negulesco|Nulflux Negulesco]] 05:29, 13 January 2009 (UTC) | |||
:I wish it did return a useful value but to do so would require the script to be halted while the accounting operation completed, which could take several seconds. Scripts that depend upon fast execution would break. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 18:17, 20 January 2009 (UTC) | |||
Can the Key be a Group Key ? | Can the Key be a Group Key ? | ||
In other words Can I pay a Group? | In other words Can I pay a Group? | ||
Line 15: | Line 19: | ||
There is indeed no point at increasing the stash while if the object containing the script is paid, it increases the amount of money it can give back to people touching it. | There is indeed no point at increasing the stash while if the object containing the script is paid, it increases the amount of money it can give back to people touching it. | ||
--[[User:Tasty Tiramisu|Tasty Tiramisu]] 11:59, 6 November 2007 (PST) | --[[User:Tasty Tiramisu|Tasty Tiramisu]] 11:59, 6 November 2007 (PST) | ||
Not sure what you're thinking... STASH is the available amount to give out, AMOUNT is the amount to give out when touched. If you increase AMOUNT when paid, the object would stop giving money quickly as STASH becomes empty. --[[User:Thraxis Epsilon|Thraxis Epsilon]] 12:42, 6 November 2007 (PST) |
Latest revision as of 10:17, 20 January 2009
Strife, when you edited my comment you noted (in history) that there was no evidence that this function should return a boolean value. I beg to differ, the function definition here on the wiki states that the return value is an integer and that it always returns 0. I think this function should be revised and the return value put to use - it should either a) return the amount of LS that was actually given or b) return 0 for transaction failure / return 1 for transaction success. How do our scripts know if llGiveMoney failed? Example: My script tries to give an avatar 10LS, but my account is at 0LS - how do we deal with this? --Nulflux Negulesco 05:29, 13 January 2009 (UTC)
- I wish it did return a useful value but to do so would require the script to be halted while the accounting operation completed, which could take several seconds. Scripts that depend upon fast execution would break. -- Strife (talk|contribs) 18:17, 20 January 2009 (UTC)
Can the Key be a Group Key ? In other words Can I pay a Group? Anylyn Hax 06:12, 5 September 2007 (PDT)
- I don't think so... but don't quote me on this. I'll get back to you once I've tried it. -- Strife Onizuka 13:53, 5 September 2007 (PDT)
I think that the money event of the example should be:
money(integer m) { AMOUNT += m; update(); }
There is indeed no point at increasing the stash while if the object containing the script is paid, it increases the amount of money it can give back to people touching it. --Tasty Tiramisu 11:59, 6 November 2007 (PST)
Not sure what you're thinking... STASH is the available amount to give out, AMOUNT is the amount to give out when touched. If you increase AMOUNT when paid, the object would stop giving money quickly as STASH becomes empty. --Thraxis Epsilon 12:42, 6 November 2007 (PST)