Page 1 of 1
Minor shopping bug
Posted: Sat Jun 05, 2010 11:48 am
by Vanguard
While playing today, I had exactly 5.00 gold and tried to buy something for 5.00 gold and it wouldn't let me. I sold a potion for 0.30 and it let me make the purchase after that. What I assume is happening is the game is checking to see if you have more gold than the price of the object, rather than as much or more.
Re: Minor shopping bug
Posted: Sat Jun 05, 2010 12:24 pm
by Canderel
There are 2 possibilities...
1) As you said, > is used instead of >=.
2) You only had 4.999 gold... dunno if the game knows the fractions smaller than 2 decimals.
Re: Minor shopping bug
Posted: Sat Jun 05, 2010 12:41 pm
by Shoob
Canderel wrote:2) You only had 4.999 gold... dunno if the game knows the fractions smaller than 2 decimals.
take for example selling ammo, if you do that I can guarantee that you will have a strange amount of gold (unless you use it to round it to a nice figure first).
Re: Minor shopping bug
Posted: Sun Jun 06, 2010 1:21 pm
by registeringislame
Floats should never be used for money. Is this a lua issue? I'd've thought lua has integers, but hell, perl doesn't.
Re: Minor shopping bug
Posted: Fri Jun 11, 2010 11:06 pm
by tomeaddict
I've had this happen---3 gold and tried to buy a lesser healing for 3. managed to raise 0.1 and my return met with consumer success.
Re: Minor shopping bug
Posted: Sun Jun 13, 2010 2:03 pm
by registeringislame
Actually I looked into it, and the lua people only seem to use doubles. Apparently this is "never a problem."
lovely.