Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

money errors

Jenn Yoshikawa
Registered User
Join date: 14 Nov 2007
Posts: 91
11-20-2008 16:03
Here is the deal it only wants to pick up the 1st price no matter what I pay it. I have tried

if (amount = llList2Integer(ticket,0))
if (amount == llList2Integer(ticket,0))
if (amount >= llList2Integer(ticket,0))

money(key id, integer amount)
{
if (amount = llList2Integer(ticket,0))
{
do stuff
}
else if (amount = llList2Integer(ticket,1))
{
do stuff
}
else if (amount = llList2Integer(ticket,2))
{
do stuff
}
else if (amount = llList2Integer(ticket,3))
{
do stuff
}
}
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
11-20-2008 16:12
The version you will want to stick with while working this out is

if (amount == llList2Integer(ticket,0))


The single = will assign that value to amount, so you'll always be running that first portion of the if. the double == does the comparison you really want.

If you are still having trouble using that form, it might help if we can see what the contents of ticket and amount look like. (You might check for variable scoping problems while you are playing, llOwnerSay those variable at the beginning of the money event, to make sure they are what you expect them to be.)
Jenn Yoshikawa
Registered User
Join date: 14 Nov 2007
Posts: 91
11-20-2008 16:18
why is ever time I ask for help on some thing I all ready did it works after I ask. lol Thanks for the help hehe