Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Detecting when you run out of L$. It's really impossible, isn't it?

Wildefire Walcott
Heartbreaking
Join date: 8 Nov 2005
Posts: 2,156
06-17-2008 15:10
From browsing these forums and the LSL wiki, I've determined the following:
- llGiveMoney always returns zero; it doesn't give any programmatic notification that your avatar is out of cash if you try to give more than you have.
- The Lindens say this is because the data's not immediately available, even though most of us are quite used to dataserver events and could certainly use such an event if LL would give it to us.
- An object cannot llGiveMoney to another object, so you can't use the money event to determine if the giving avatar actually has the right amount of cash.

Is this still the case? Is there really no way, in this enormous virtual economy, for a script to determine whether its owner doesn't have enough money to give someone else?

I ask because I have an alt who owns objects that give money to newbies. That account has no income source, and I only learn that she's out of cash when people start IMming me, saying "hey I clicked ur thing and I never got my lindonz!!!" This happens frequently, and it's really beginning to bug.
_____________________
Desperation Isle Estates: Great prices, great neighbors, great service!
http://desperationisle.blogspot.com/

New Desperation Isle: The prettiest BDSM Playground and Fetish Mall in SL!
http://desperationisle.com/

Desperation Isle Productions: Skyboxes for lots (and budgets) of all sizes!
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
06-17-2008 15:25
Scrape your alt's user page for the account balance.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Eric Stuart
Registered User
Join date: 5 Jul 2006
Posts: 203
06-17-2008 15:48
You could set up a variable that is set at the start to the exact amount of linden's on the alt. Then, when it's clicked on, you subtract the number of lindens given out from the variable at the same time as the linden's are given. When the variable == 0 or variable < 0, you change it to state that there are no more linden to give out at that time. As well, you can have it IM a user when the variable < 100 to know that it's running low.
Wildefire Walcott
Heartbreaking
Join date: 8 Nov 2005
Posts: 2,156
06-17-2008 16:00
From: Jesse Barnett
Scrape your alt's user page for the account balance.

Damn, that's actually a pretty good idea. Seems like it might be a little bit of a challenge since that information is account-specific and password-protected, but I think I might know how to get to it.
_____________________
Desperation Isle Estates: Great prices, great neighbors, great service!
http://desperationisle.blogspot.com/

New Desperation Isle: The prettiest BDSM Playground and Fetish Mall in SL!
http://desperationisle.com/

Desperation Isle Productions: Skyboxes for lots (and budgets) of all sizes!
Wildefire Walcott
Heartbreaking
Join date: 8 Nov 2005
Posts: 2,156
06-17-2008 16:04
From: Eric Stuart
You could set up a variable that is set at the start to the exact amount of linden's on the alt. Then, when it's clicked on, you subtract the number of lindens given out from the variable at the same time as the linden's are given. When the variable == 0 or variable < 0, you change it to state that there are no more linden to give out at that time. As well, you can have it IM a user when the variable < 100 to know that it's running low.

That's a good idea too, and something that I'd considered. The problem I saw with it was that if I transferred money to the alt from my main, the item would get out of sync. I think she also pays some group debits too, since she's a co-owner of some of my groups. *hrm* I could probably fix that, though. However, thinking about it... my main account could have an object that let me reset the amount that my alt's money-countdown object whenever I sent the alt money. I would just tell the transmitter how much I had transferred, and the remote object would increment that amount.
_____________________
Desperation Isle Estates: Great prices, great neighbors, great service!
http://desperationisle.blogspot.com/

New Desperation Isle: The prettiest BDSM Playground and Fetish Mall in SL!
http://desperationisle.com/

Desperation Isle Productions: Skyboxes for lots (and budgets) of all sizes!
Eric Stuart
Registered User
Join date: 5 Jul 2006
Posts: 203
06-17-2008 16:07
Just have the script have a manual reset that when you, either as your alt or your main, tell the script a new number and it will reset the value of the variable.