Minor shopping bug
Moderator: Moderator
Minor shopping bug
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
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.
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.
-
- Reaper
- Posts: 1535
- Joined: Mon Jan 22, 2007 6:31 pm
- Location: East of the sun, west of the moon
Re: Minor shopping bug
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).Canderel wrote:2) You only had 4.999 gold... dunno if the game knows the fractions smaller than 2 decimals.
Oliphant am I, and I never lie.
-
- Halfling
- Posts: 85
- Joined: Sun May 23, 2010 5:25 am
Re: Minor shopping bug
Floats should never be used for money. Is this a lua issue? I'd've thought lua has integers, but hell, perl doesn't.
-
- Low Yeek
- Posts: 5
- Joined: Tue Jun 08, 2010 8:17 pm
Re: Minor shopping bug
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.
-
- Halfling
- Posts: 85
- Joined: Sun May 23, 2010 5:25 am
Re: Minor shopping bug
Actually I looked into it, and the lua people only seem to use doubles. Apparently this is "never a problem."
lovely.
lovely.