|
Jason Foo
Old Timer
Join date: 6 Feb 2004
Posts: 105
|
08-21-2006 10:08
I am trying to add something into my script that will detect if debit fails due to the owner of the object having insufficient funds for the transaction. for instance, a slot machine needs to pay out money to the player, but the owner doesn't have the money to pay out. I need the machine to be able to detect the error that is generated by the insufficient funds, and notify the owner of the failed payment.
any ideas? I couldn't find anything in the wiki
_____________________
If my doctor told me I had only six minutes to live, I wouldn't brood. I'd type a little faster.
|
|
Adriana Caligari
Registered User
Join date: 21 Apr 2005
Posts: 458
|
08-21-2006 10:30
Sorry - as far as I am aware it doesnt exist, there is no error return on a llGiveMoney - no way of telling if the money got thru, there was enough money in the bank, etc etc
Or at least it is not documented anywhere ( I keep hearing rumours of undocumented LSL features that I do sometimes wonder if this is one of them )
|
|
Jason Foo
Old Timer
Join date: 6 Feb 2004
Posts: 105
|
08-21-2006 10:54
Yes... Unfortunately, thats all I keep seeing as well. I was hoping that somewhere someone knew a hack or a way to get around it. but it seems that since there is no return value, and the error is only displayed to the owner of the object, there is no way to capture the error. I guess its jusst another shortcoming of LSL.
_____________________
If my doctor told me I had only six minutes to live, I wouldn't brood. I'd type a little faster.
|
|
Adriana Caligari
Registered User
Join date: 21 Apr 2005
Posts: 458
|
08-21-2006 11:24
Just thinking about this and a bolt of inspiration struck me - ouch
How about using a http request to query your account history via the secondlife web and see what changed.
( Possibly build a php page that you can feed name and amount to, then it can load the data and pass back yes or no. If it is in the transaction history then it got paid)
Umm....will have to try that out.
|
|
Angel Fluffy
Very Helpful
Join date: 3 Mar 2006
Posts: 810
|
08-21-2006 12:49
From: Adriana Caligari Just thinking about this and a bolt of inspiration struck me - ouch
How about using a http request to query your account history via the secondlife web and see what changed.
( Possibly build a php page that you can feed name and amount to, then it can load the data and pass back yes or no. If it is in the transaction history then it got paid)
Umm....will have to try that out. Wouldn't that require your script to have your SL login details written clearly inside it, and definable by the object owner? If so, all I can say is : make sure you blank the details before you start selling that script...
_____________________
Volunteer Portal (FAQs!) : https://wiki.secondlife.com/wiki/Volunteer_Portal
JIRA / Issue Tracker : http://jira.secondlife.com (& http://tinyurl.com/2jropp)
|
|
Adriana Caligari
Registered User
Join date: 21 Apr 2005
Posts: 458
|
08-21-2006 12:54
From: Angel Fluffy Wouldn't that require your script to have your SL login details written clearly inside it, and definable by the object owner? Not necessarily - if you went the PHP route you could give the user a username and password ( to be stored in a no-read notecard ) that is validated by the PHP page. Further security on the page would verify that a script ( lsls@... ) sent it and only answer the required question yes or no. So all a hacker ( if they got in ) would be able to do is to fire queries at the page on names and amounts and get a yes/no reply. (am sure more security would be needed, but havent sat down and put the idea onto paper yet - just thinking out loud )
|
|
Jason Foo
Old Timer
Join date: 6 Feb 2004
Posts: 105
|
08-22-2006 09:41
that sounds really interresting, but would of course require a lot of work to get that done. I'm sure it can be, but closing all the security holes would be a bear. Let me know if this worked for you. I am definately interrested to see it can be pulled off.
_____________________
If my doctor told me I had only six minutes to live, I wouldn't brood. I'd type a little faster.
|