Money
|
|
Travis Lambert
White dog, red collar
Join date: 3 Jun 2004
Posts: 2,819
|
05-04-2005 11:29
Heya, guys - let me preface this by saying I'm a *beginning* scripter - if this sort of question has been answered before, my apologies. I was going through the wiki on the llGiveMoney() function - and quickly became perplexed. The function is kinda simple - no problems there. My question is in regards to the following Q/A on the wiki entry: Q: What happens if the owner doesn't have enough funds to satisfy the llGiveMoney request? A: The script pops up an error dialog stating "Insufficient funds". Because there isn't any return value from llGiveMoney, you need to keep track of money inside your script. This can be difficult to accomplish. There's no direct way to get your script to know whether or not it's out of money, but it'll keep telling the owner that it's out.I'm shocked that more of a buzz hasn't been made to LL about the fact that there's no direct way to get your script to know whether or not it's out of money. What's the story there - is this something that would require a re-architecture to fix or something? Is there already a workaround for this out there that's not discussed on the wiki? Also - the annoyances section of the wiki defines annyoances as: "...aren't technically bugs, but are often confused with them. Annoyances can result in unexpected script behavior, but are the result of intentional design decisions on the part of the SL developers."This money issue is listed in annoyances as well. Any thoughts on why this behavior is considered an "annoyance" and not a "bug"? I wanted to discuss this here first before I made an uninformed post to feature suggestions. Sure would be nice if you could query your current L$ balance with a function, or at bare minimum, get a return value from llGiveMoney(). Thoughts? 
|
|
Legith Fairplay
SL Scripter
Join date: 14 Jul 2004
Posts: 189
|
05-04-2005 13:55
first off, check out prop 48 for an existing proposal on llGiveMoney. (if your curious I have not voted for it since this is not my top priority, but it is a defiantly a needed feature) Many people have made a buzz about this.. since it makes it hard to make automatic payments. I think llGiveMoney was really only meant as a method of returning someone's change, perhaps automating prizes. The closest thing to a work around is to have the owner pay the object to give the L$ (even though they own it) and then on payment send the money with llGiveMoney. This is *mostly* safe.. but I'm quite sure there is one theoretical security hole (ignoring insecure communication to external objects/sites) If in the time you give you L$ to the object and the time the llGiveMoney call is made you give all of your money away, this might be done with good timing on the part of another script that sends all of your L$ to an alt just after you pay the other object. From: Travis Lambert This money issue is listed in annoyances as well. Any thoughts on why this behavior is considered an "annoyance" and not a "bug"?
because as the wiki mentioned Linden Labs created the call in its current form without any (useful) return value. If they meant it to return true on success and false on failure and it didn't, then you have a bug. The difference is a shortcoming, as opposed to undocumented/incorrect behavior) The recent town hall with Cory mentioned the following: From: Cory Linden's Town Hall 04/27 Jeska Linden: Nexus Nash: Will array's ever be considered in LSL. + Will llGiveMoney() ever return a bool value on succesfull tranfer? Cory Linden: With the mono conversion, many new data types become relatively easy to add in. Cory Linden: wrt llgivemoney, we'd like to create a better sales API in LSL that would provide better data to sellers on several levels. Bugs are taking priority right now.
some other threads on this topic: http://forums.gamingopenmarket.com/viewtopic.php?t=36/13/cd/25234/1.html/invalid_link.html
|
|
Travis Lambert
White dog, red collar
Join date: 3 Jun 2004
Posts: 2,819
|
05-04-2005 21:09
Thanks for all the background & information, Leigth  Makes some sense now 
|
|
Catherine Omega
Geometry Ninja
Join date: 10 Jan 2003
Posts: 2,053
|
05-04-2005 21:55
From: Travis Lambert Also - the annoyances section of the wiki defines annyoances as: "...aren't technically bugs, but are often confused with them. Annoyances can result in unexpected script behavior, but are the result of intentional design decisions on the part of the SL developers."This money issue is listed in annoyances as well. Any thoughts on why this behavior is considered an "annoyance" and not a "bug"? It's considered an "annoyance" because it's not broken. There's no bug -- it works perfectly as designed. Unfortunately, the design is flawed. The distinction is probably not as important to others as it is to me, huh? 
|
|
Klintel Kiesler
Registered User
Join date: 31 Dec 2003
Posts: 51
|
05-04-2005 22:27
From: Catherine Omega It's considered an "annoyance" because it's not broken. There's no bug -- it works perfectly as designed. Unfortunately, the design is flawed. The distinction is probably not as important to others as it is to me, huh?  That's true. One of the worst things about programming, especially with games is the sheer number of bugs. Most of the time a development team can't quite keep the volume of bugs at a stable level. If the bug can't be easily fixed it become a feature, maybe a annoying screwed up feature, but it's still a feature. A majority of programmers that I know personally seem to be perfectionist. They take a lot of pride in their work. Sadly they tend to lose sleep over small bugs. Some bugs just can not be fixed, even if they 'seem' simple.
|
|
Kelly Linden
Linden Developer
Join date: 29 Mar 2004
Posts: 896
|
05-05-2005 07:49
It is not possible for llGiveMoney to return a meaningful value, the data is simply not available when and where it would be needed to make that happen. As Cory has said, we are looking at providing better and more complete merchant features, we know they are needed.
_____________________
- Kelly Linden
|
|
Ace Cassidy
Resident Bohemian
Join date: 5 Apr 2004
Posts: 1,228
|
05-05-2005 07:57
If you're looking to script something like a casino game or similar where you need to absolutely know that there are sufficient funds, I would suggest that you spring the $9.95 for an additional basic account, have the object/script owned by that AV, and don't EVER spend that alt's L$. That way, you can keep a running "balance of available funds" variable in your script(s).
- Ace
_____________________
"Free your mind, and your ass will follow" - George Clinton
|
|
Travis Lambert
White dog, red collar
Join date: 3 Jun 2004
Posts: 2,819
|
05-05-2005 13:18
From: Ace Cassidy If you're looking to script something like a casino game or similar where you need to absolutely know that there are sufficient funds, I would suggest that you spring the $9.95 for an additional basic account, have the object/script owned by that AV, and don't EVER spend that alt's L$. That way, you can keep a running "balance of available funds" variable in your script(s).
- Ace Well - let me give up some background on why the topic interested me  If you have an aversion to the bizarre, I suggest you don't read much further... Several months ago, I received a strange question from a newbie. He told me that he was hanging out at an obscure location that had a money machine. (From his description - it appeared to be set incorrectly - giving out too much). The newbie hung there all night, until the owner's money supply was exhausted. Once the money supply was exhausted, the newbie saw the messages "Invalid parameter in llGiveMoney" - but hung out for a while longer, no longer receiving any 'free money'. After a while of this, the Newbie apparently IMed the owner of the object, demanding a balance payment of the free money that the machine was no longer paying out. The owner of the machine didn't take the Newbie very seriously, and sent him on his way. The newbie's question to me - Could he file an abuse report on the owner of the money machine, and could the Linden's force the owner to pay him his owed "free money". (Of course - my answer was - you can file an abuse report on anything you like - but I wouldn't expect a result - it is after all, 'free' money  ). As idiotic as the example is above, it always sat in the back of my mind "Why didn't the owner just build in some kind of failsafe in his script so it wouldn't exhaust his balance." Now I understand why 
|
|
Ace Cassidy
Resident Bohemian
Join date: 5 Apr 2004
Posts: 1,228
|
05-05-2005 14:11
From: Travis Lambert The newbie's question to me - Could he file an abuse report on the owner of the money machine, and could the Linden's force the owner to pay him his owed "free money". *shakes head* I'll give the guy credit. He has balls! - Ace
_____________________
"Free your mind, and your ass will follow" - George Clinton
|
|
Catherine Omega
Geometry Ninja
Join date: 10 Jan 2003
Posts: 2,053
|
05-05-2005 14:39
From: Travis Lambert As idiotic as the example is above, it always sat in the back of my mind "Why didn't the owner just build in some kind of failsafe in his script so it wouldn't exhaust his balance." Now I understand why  The easiest way to accomplish something like this is to define a maximum payable amount in the script and then not exceed it, always making sure there's at least that much in your account. Like balancing one's chequebook, it can take some discipline on the part of the owner, though... 
|
|
Jack Lambert
Registered User
Join date: 4 Jun 2004
Posts: 265
|
05-06-2005 23:45
I put a proposition for something even more simple than this... Basically it is just a query for the owner's balance.. it's in the voting now but I'm the only one voted on it  llBalance() ... return owner's balance... doesn't have to be an error trap within the llGiveMoney, it can be figured out before the llGiveMoney() ... could be useful for other things as well --Jack Lambert
_____________________
---------------------------- Taunt you with a tree filled lot? hahahahahahaha. Griefer trees! Good lord you're a drama queen. Poor poor put upon you.
-Chip Midnight
|
|
Lavanya Hartnell
Registered User
Join date: 9 Dec 2005
Posts: 55
|
Insufficient funds
08-30-2007 09:03
Am I really the only one trying to make serious business systems in SL? llGiveMoney() is an important part of a proper credit system or automatic payor (like for paying rent). At least, it would be if only it was possible to confirm payments in script. I understand that llGiveMoney() would be difficult to implement with a return value indicating success or failure. But why not implement an event handler like this: . money_given(integer result_code, key agent, integer amount) Surely this would be as easy to implement as the code for returning a line of text from a notecard. result_code could be one of: . MONEY_GIVEN . MONEY_INSUFFICIENT_FUNDS . MONEY_PERMISSION_NOT_GRANTED Is there a security risk? I don't think so. It doesn't invade privacy. It doesn't offer the ability to pay someone; it just reacts to a payment attempt. On the other hand, no accounting system can function properly without the ability to track transactions. Right now, our only option is to manually check the transaction history from the web site. This is a strong and reasonable request that would help LL make fraud detection and customer service easier for businesses and, in one small step, dramatically improve SL as a platform for business. - Lavanya
|
|
Malachi Petunia
Gentle Miscreant
Join date: 21 Sep 2003
Posts: 3,414
|
08-30-2007 09:37
From: someone Surely this would be as easy to implement as the code for returning a line of text from a notecard. Except that the money transfer is sent as a request to the asset server (money server?) which is notorious for not returning status. Furthermore, because requests to other servers are not time-limited, even if it did return the status of the transaction it would need to be handled by a new asynchronous event type (money_actually_sent() anyone?).
|
|
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
|
08-31-2007 00:17
I'd say one reason why you cannot check the balance is privacy issues. because if there was such a feature you could abuse it easily to obtain information on how much money other people have.
Just make a script that does the check on owner change and phones back home.
You wouldn't want others to be doing such things to you, would you?
|
|
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
|
08-31-2007 02:14
From: Jack Lambert I put a proposition for something even more simple than this... Basically it is just a query for the owner's balance.. it's in the voting now but I'm the only one voted on it  llBalance() ... return owner's balance... doesn't have to be an error trap within the llGiveMoney, it can be figured out before the llGiveMoney() ... could be useful for other things as well --Jack Lambert I'm guessing the reason llBalance() was left out was because of the potential for abuse. One could easily IM the script creator with the current owner's name and balance.. would you want other people knowing how many L's were in your account? Just my guess... Edit.. wow, didnt see your post squirel.... weird...
|
|
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
|
08-31-2007 12:35
Just keep a huge balance of Lindens, so you never run out 
|