Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Money event

Jimmy Loveless
Hello, avatar!
Join date: 1 Oct 2004
Posts: 35
12-13-2004 21:35
I have a script that has only one state with a money event, yet the damn "Pay" slice will not disable. The money event is in the default state, and it looks like this:

money(key id, integer amount)
{
gkPlayerID = id;
gnAmount = amount;
state next_state;
}

It used to have some processing code there but i moved it into another state to try to get "Pay" disabled. Any clues? I don't see any reason why.

This might be a clue... When paying (when it shouldn't be active), it certainly does NOT trigger the money event that IS there.

I'm certain there is not another script linked in that has a money event. That was the 1st thing I thought of. Any suggestions appreciated.

Bestest,
JL
Antagonistic Protagonist
Zeta
Join date: 29 Jun 2003
Posts: 467
12-13-2004 22:11
I have seen this happen. Sometimes shifting a state seems to disable the "pay" option, sometimes it does not. Best bet is to assume that the pay option will always be active and design your system around that.

For example, you could have a money event in all the other states that simply returned the money to the person that paid.

-AP
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
12-13-2004 22:17
could you post more script?

EDIT:
nm do what Antagonistic suggested. (i wasn't sure what the problem was)
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Jimmy Loveless
Hello, avatar!
Join date: 1 Oct 2004
Posts: 35
12-13-2004 23:19
Is that an acknowledged bug/feature/bit-o-sketchyness? I have other objects where shifting to another money-less state properly disables the pay slice and furthermore, this behavior just started - i.e. pay used to go disabled when it should in this particular object.

OK, I just dropped the script into a fresh object and the problem "fixed itself", pay gets disabled when it should. The original object still exhibits the behavior described.

I also notice that in any case, when a Pay dialog is showing, you can right-click the object & get a second Pay dialog.. Ugly.

Thanks for the suggestion AP, I suppose its better safe than sorry with such matters anyway.

I'm pretty new here, is there an official buglist? I see the short list in the wiki.

Thanks so much,
j
Antagonistic Protagonist
Zeta
Join date: 29 Jun 2003
Posts: 467
12-14-2004 10:09
From: someone
I have other objects where shifting to another money-less state properly disables the pay slice and furthermore, this behavior just started - i.e. pay used to go disabled when it should in this particular object.


Yep, I have seen that exact thing. Objects that behaved properly one day misbehaved the next but then corrected themselves when shuffled about. Seemingly without rhyme or reason.

I dont know if it is ackowledged or recognized .. but even so it is a good idea to always have a mechanism for handling a pay event. For example ... two people could be clicking pay at the same time & get the window. One of them enters their amount and triggers the script. The other waits a moment and then pays after the script changed state. It is a good idea to design your scripts so that at any time money gets sent to the object, it can be dealt with (even if that just means returning it to the payer).

-AP
Water Rogers
Registered User
Join date: 1 May 2003
Posts: 286
12-14-2004 16:37
Personal experience here tells you this: Money event + multiple states = bad combo.

There could be a number of reasons why... including what Taggy pointed out. Also the fact that a 'burp' or ripple in the server could throw the object back into the default state at any time. If it's absolutely necessary for the object to need multiple states AND a money event in one of the states, be sure to use a lot of caution and understand some risks involved in doing so. If you can, split the script into multiple scripts where one script can handle the money event alone, and pass parameters back and forth via message linking.

Anyway, that's speaking from experience.

--Water
_____________________
From: Philip Linden

For the more technically minded - the problem is actually NOT the asset server (or 'asshat' as you prefer to affectionately call it herein).