Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llSetPayPrice trouble

Frank Elderslie
Registered User
Join date: 26 Oct 2006
Posts: 8
12-31-2006 15:17
I'm toying with llSetPayPrice and ran into a head-scratcher (at least for me). I ran the following code, denying permission_debit, and as predicted the llSetPayPrice triggered. However, with I reset the script and tried to grant permission, it still ran through the code with ELSE (the llSay was triggered). Even commenting-out all the appropriate code, it still will not reset llSetPayPrice. Any thoughts?

-Frank

default //Set everything up
{
state_entry()
{
llRequestPermissions(llGetOwner(),PERMISSION_DEBIT); // Allow llGiveMoney
// integer perm = llGetPermissions();
// if (perm & PERMISSION_DEBIT) // check if permission has been granted
// {
//llSay(0, "Permission Granted";);
// }else
// {
// llSetPayPrice(PAY_HIDE, [50, PAY_HIDE, PAY_HIDE, PAY_HIDE]);
//llSay(0, "Permission NOT granted";);
// }
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
12-31-2006 15:23
requesting permissions is not a synchronous command (it does not hold up script execution) and llSetPayPrice sets a prim attribute.

CODE

default //Set everything up
{
state_entry()
{
llRequestPermissions(llGetOwner(),PERMISSION_DEBIT ); // Allow llGiveMoney
}
run_time_permissions(integer perm)
{
if (perm & PERMISSION_DEBIT) // check if permission has been granted
{
llSetPayPrice(PAY_DEFAULT, [PAY_DEFAULT, PAY_DEFAULT, PAY_DEFAULT, PAY_DEFAULT]);
llSay(0, "Permission Granted");
}
else
{
llSetPayPrice(PAY_HIDE, [50, PAY_HIDE, PAY_HIDE, PAY_HIDE]);
llSay(0, "Permission NOT granted");
}
}
}
_____________________
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