Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llGiveMoney

Russ Allen
scripter
Join date: 22 Mar 2007
Posts: 22
05-31-2007 07:47
Hi,
I was just wondering if someone has only L$5 and he uses llGiveMoney to give someone L$6 what would happen?
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
05-31-2007 07:55
According to The Wiki:

From: The Wiki
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.
As KellyLinden explains: "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."

When llGiveMoney fails due to "Insufficient Funds", the script is not delayed: The error appears to the owner and noone else, and the script continues to function without any delay or conflict.