I've been scouring the forums for an answer to my question, and while I did find a thread that addressed it, /54/aa/42576/1.html, it was a really old thread and I didn't want to "necropost." So, here I am.

Here's my question/problem, as it was asked in the old thread (not by me).
"...when I go to pay (myself), it list fastpay amounts and the user has to manually punch in a $ amount. How do I get it to make a pay button with the exact cost of each item?"
The response given was simply a line of code, namely,
"llSetPayPrice( PAY_HIDE, [ItemCost, PAY_HIDE, PAY_HIDE, PAY_HIDE] );."
Not being a scripter, my first thought was, "Ok, but where does it go in the script?" But I thought I'd play with it and see what happened.
Well, I got error after error, most were either "name not defined within scope" or "syntax error." After trying slightly modified versions of the line, I FINALLY got the script to save/recompile with no errors. I reset the script and set it to running and tried it out. Nothing had changed.
I don't know if anyone would need to see the entire script to help. If so, please visit the URL above (this post is already too long.

Here is the snippet that contains the code in question, taken from my current version of the script.
}
}
money( key giver, integer amount )
// Thanks Kaleb Underthor for your shared money function
{
llSetPayPrice( PAY_HIDE, [currentpricelist, PAY_HIDE, PAY_HIDE, PAY_HIDE] );
integer price = (integer)llList2String(currentpricelist,(selected - 1));
string object = llList2String(currentitemlist,(selected - 1));
if ( amount < price )
{
llSay( 0, "This item costs L$" + (string) price );
llSay( 0, "You only paid "+(string)amount);
llGiveMoney( giver, amount );
}
else
{
llSay( 0, "Enjoy your " + object );
llGiveInventory( giver, object );
if(llGetListLength(recentsales)>=30)
llDeleteSubList(recentsales,0,0);
if(recordsales==1)
recentsales = recentsales + (llGetDate()+":"+object+":"+(string)price);
//fixing the error here
if (amount > price)
{
llGiveMoney(giver, amount - price);
}
if(percentshare > 0)
{
owed += ((price * percentshare)/100);
}
//
}
} // end money routine
}
Anyway, that is my problem. I'm sorry for the length of this post. Any help, advice or guidance would be reaaaally appreciated.
Thanks so much!