Don't click here unless you want to be banned.

LSL Wiki : llGiveMoney

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are
llGiveMoney(key destination, integer amount)

Transfers amount of Linden dollars from the script owner to destination. Requires the PERMISSION_DEBIT run-time permission.

destination can only be an avatar, not an object or a group. The recipient does not need to be in the same sim as the object. If amount is less than or equal to zero, the object will say "Invalid parameter in llGiveMoney()." This looks pretty unprofessional, so if you're writing a vendor script that gives change (for example), you'll probably want to avoid it.

Older versions of the LSL documentation stated that llGiveMoney returned an integer. If the owner has insufficient funds to cover the llGiveMoney call, an error will appear on the user's screen (There is no longer an error message, the function silently fails.), but there will be no data returned to the script itself. The return integer from llGiveMoney is always zero.

As of Tuesday, November 6th, 2007, llGiveMoney is now throttled:
Use is limited to 30 payments in a 30 second interval for each resident on a region. Sustained overage will produce a script error and halt payments while the rate remains excessive. Historically, faster payments have failed intermittently.

This example script asks for the PERMISSION_DEBIT permission on startup and then tries to give L$1 to anyone who touches it.


     touch_start(integer num_detected)

For an additional example, see ExampleMoney.

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" (There is no longer an error message, the function silently fails.). 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."

Q: Wait, it returns zero? Are you sure it doesn't actually return nothing? Maybe you're doing it wrong.
A: Nope, it definitely returns zero, and it does so every time.

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.

To receive money, use the money event.

This article wasn't helpful for you? Maybe the related article at the LSL Portal is able to bring enlightenment.

Functions | Agent/Avatar Jasa SEO Jasa SEO Murah Sepatu Online Toko Sepatu Online Sepatu Sepatu Murah Sepatu Safety Sepatu Futsal Cheapes Hostgator Coupon Link Booking Televisori offerte Notebook Offerte Berita Terkini Internet Marketer Muda Internet Marketer Indonesia Portatile Apple RDAnet Lorks Karikatur Bisnis Modal Kecil Bisnis UKM Berita Terbaru Iklan Baris Jasa SEO Jasa SEO Murah SEO Indonesia Konsultan SEO SEO Belajar SEO Kursus SEO Kursus SEO Murah Jam Tangan Casio Jam Tangan Casio Jam Tangan Murah Jam Tangan Grosir Baju Terbaru Grosir Baju Baju Terbaru Grosir Baju Murah Bisnis Online Belajar SEO Kerupuk Kerupuk kulit Social Bookmark Dofollow Social Bookmark Kumpulan Puisi Kirim Puisi bola hantu Penumbuh Rambut Penumbuh Rambut timbangan WBC Wonogiri Jasa SEO Murah Jasa SEO Jam Tangan Murah
There are 5 comments on this page. [Display comments/form]