llSetPayPrice()

Creating scripts
Post Reply
User avatar
Handy Low
Posts: 231
Joined: Fri Nov 08, 2013 3:38 pm
Location: Yorkshire, England
Has thanked: 207 times
Been thanked: 140 times
Contact:

llSetPayPrice()

Post by Handy Low »

Hi folks.

The llSetPayPrice() function seems to be unavailable in the scripting engine Kitely is using - it stops the script event silently, like other functions which I assume are unported. I've tried different parameters to it, but it seems to crash the event regardless.

This means that in-world vendors can't use the "Pay" method of selling (unless I'm missing a trick here), so it's impossible for a script in the vendor to detect and record a sale. I like keep a record of all sales so that I can distribute product updates to my customers for bug fixes, enhancements, etc.

Is there any way we can get this function working?

Also, (off-topic for this section but related) I can't find a transaction history other than the Market's Sales History. This means the only way I can know who my customers are is by the alerts that pop up in the viewer, which are easy to miss.

Any thoughts, anyone?
Handy Low
User avatar
Dundridge Dreadlow
Posts: 616
Joined: Mon May 06, 2013 2:23 pm
Location: England
Has thanked: 590 times
Been thanked: 339 times

Re: llSetPayPrice()

Post by Dundridge Dreadlow »

Hmm, llSetPayPrice is listed as supported by OpenSim, should be ok. Testing...

On setting the pay price, I get (up to) 4 options with prices to pay, and the money event responds with the correct key and amount paid. (I've not tested a sales script with a money event with another avatar on Kitely, but it appears to behave normally for me)

I don't think that paying yourself will show up in the transaction logs, but buying objects in world DOES show on the http://www.kitely.com/history page for both seller and purchaser, so should be good.

You said it stops the EVENT silently ? What are you doing ?
Untitled-2.png
ImageImageImageImageImageImage
PS. Kitely is awesome.
User avatar
Handy Low
Posts: 231
Joined: Fri Nov 08, 2013 3:38 pm
Location: Yorkshire, England
Has thanked: 207 times
Been thanked: 140 times
Contact:

Re: llSetPayPrice()

Post by Handy Low »

Interesting. I think I've narrowed it down to this - if you don't specify four items in the price list, it has the effect I described. That's reasonable, because the SL Wiki does say specifically: Four PAY_* constants and/or positive integer values. My vendor script from SL only had one item in that list.

So it's actually SL's compiler and scripting engine that's not as rigorous as it ought to be, or the documentation that's incorrect, depending on which side of that fence you choose to sit. :)

So my SL code:

Code: Select all

    llSetPayPrice(PAY_HIDE, [ Price ]);
becomes:

Code: Select all

    llSetPayPrice(PAY_HIDE, [ Price, PAY_HIDE, PAY_HIDE, PAY_HIDE ]); 
and all is well. Thanks, Dundridge!
You said it stops the EVENT silently ? What are you doing ?
I had that line in a state_entry() event, and none of the subsequent lines in that event were executing. Other event processing wasn't stopped, though, nor was any visible error generated. I've seen this behaviour before in Kitely - this code shows it happening:

Code: Select all

default
{
    state_entry()
    {
        llSay(0, "1"); // this appears in chat
        llSetSoundQueueing(FALSE);
        llSay(0, "2"); // this doesn't
    }
}
I'd guess that llSetSoundQueueing() isn't a supported function in OpenSim, but it wasn't causing much of a problem me so I never chased it down. The same happens with llCollisionSprite().
These users thanked the author Handy Low for the post:
Dundridge Dreadlow
Handy Low
User avatar
Handy Low
Posts: 231
Joined: Fri Nov 08, 2013 3:38 pm
Location: Yorkshire, England
Has thanked: 207 times
Been thanked: 140 times
Contact:

Re: llSetPayPrice()

Post by Handy Low »

Oh, and thanks for pointing out where the Transaction History is on Kitely, carefully hidden as it was in the GREAT BIG NAVBAR ACROSS THE TOP OF THE SCREEN.

I've scheduled myself an eyesight test for tomorrow morning and a brain test for the afternoon.
These users thanked the author Handy Low for the post (total 2):
Dundridge DreadlowIlan Tochner
Handy Low
User avatar
Dundridge Dreadlow
Posts: 616
Joined: Mon May 06, 2013 2:23 pm
Location: England
Has thanked: 590 times
Been thanked: 339 times

Re: llSetPayPrice()

Post by Dundridge Dreadlow »

Ah.. I see :) Yeah, OpenSim follows the scripting rules a lot more accurately than SL, SL lets you get away with stuff you shouldn't. Scripts written for BOTH are best developed on OpenSIm, heh. There are a bunch of other (minor) things that will show up later if you are doing a lot of scripts.

Glad to help :D
ImageImageImageImageImageImage
PS. Kitely is awesome.
User avatar
Dundridge Dreadlow
Posts: 616
Joined: Mon May 06, 2013 2:23 pm
Location: England
Has thanked: 590 times
Been thanked: 339 times

Re: llSetPayPrice()

Post by Dundridge Dreadlow »

Haha, don't feel bad, there are loads of questions in the forums (well, at least two recently) that ask "where are my remaining minutes listed", and that's on the navbar too :)
ImageImageImageImageImageImage
PS. Kitely is awesome.
User avatar
Constance Peregrine
Posts: 2349
Joined: Sun Dec 23, 2012 11:35 am
Has thanked: 2778 times
Been thanked: 1482 times

Re: llSetPayPrice()

Post by Constance Peregrine »

I am pretty sure I saw that llSetSoundQueueing() has been implemented in 76 coming to Kitely soon.
Laissez faire et laissez passer, le monde va de lui même!
My little sounds store https://www.kitely.com/market?store=2040306

Ephemeral wanderer...
User avatar
Dot Matrix
Posts: 1625
Joined: Sun Jul 28, 2013 3:26 am
Has thanked: 1209 times
Been thanked: 2324 times

Re: llSetPayPrice()

Post by Dot Matrix »

Minethere Always wrote:I am pretty sure I saw that llSetSoundQueueing() has been implemented in 76 coming to Kitely soon.
Yes, it has been. See the release notes here: http://opensimulator.org/wiki/0.7.6_Release#Sound
These users thanked the author Dot Matrix for the post:
Handy Low
User avatar
Handy Low
Posts: 231
Joined: Fri Nov 08, 2013 3:38 pm
Location: Yorkshire, England
Has thanked: 207 times
Been thanked: 140 times
Contact:

Re: llSetPayPrice()

Post by Handy Low »

Dundridge Dreadlow wrote:Ah.. I see :) Yeah, OpenSim follows the scripting rules a lot more accurately than SL, SL lets you get away with stuff you shouldn't. Scripts written for BOTH are best developed on OpenSIm, heh. There are a bunch of other (minor) things that will show up later if you are doing a lot of scripts.
Funnily enough, some of the scripts I sell actually started life in OpenSim - I did a lot of building of products for SL in my own grid and the beginnings of some of my scripts go back to that. OpenSim scripting is certainly a lot better than it was in 2008 when I started doing that - sometimes I'd have to switch to SL to do the coding while still building and texturing in OpenSim.

Yes, it is easier to go from OpenSim to SL than vice versa, partly because the SL engine allows for more complex expressions, especially with bitwise operations and vector arithmetic. Moving my scripts over to Kitely involved a fair amount of simplification of expressions, but at least there were compiler errors to flag them. And there was nothing that wasn't pretty easily simplified, even if it did mean introducing intermediate variables sometimes. Moving in the other direction, of course, had nothing like that.

Actually, the biggest challenge in copying my scripts over to Kitely and InWorldz was the conversion of several hundred texture and sound UUIDs - I evolved a method of doing that automatically using a LSL scripts and a spreadsheet to collect the UUIDs and a Linux BASH script to convert the sources for each grid. Much fun. Once that was done, the rest was pretty straightforward for the most part.
These users thanked the author Handy Low for the post:
Dundridge Dreadlow
Handy Low
Post Reply