I filled my bucket once and the number was fine, then I filled it from two other hives and it went to -429496728 honey...
From the third hive I also got "Beeswax" with no quality
-
sabinati
- Posts: 15527
- Joined: Mon Jul 13, 2009 4:25 am
- Location: View active topics
Re: quality -429496728 honey
hey loftar i think the beehives might be bugged
-
loftar
- Posts: 9096
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: quality -429496728 honey
Bugged? No way, I won't believe it! :)
The problem is that I haven't been able to reproduce it at all when debugging them, however. Not even the secondary bug which causes them always to yield LQ honey. :P
Anyway, hpmons, I suggest you throw away that honey (and wax) before using it. Just by crafting with it, you'll get millions of negative LPs.
The problem is that I haven't been able to reproduce it at all when debugging them, however. Not even the secondary bug which causes them always to yield LQ honey. :P
Anyway, hpmons, I suggest you throw away that honey (and wax) before using it. Just by crafting with it, you'll get millions of negative LPs.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
-
Lothaudus
- Posts: 641
- Joined: Fri Oct 23, 2009 12:32 pm
- Location: Adelaide, Australia
Re: quality -429496728 honey
Can't you set the database field as unsigned, forcing it to become a positive number no matter what?
Oh wai... Massive LP gain. Right.
Oh wai... Massive LP gain. Right.
Barry Fletcher Norwin
Lawspeaker of Crossroads - Leader of Codexia - Keeper of the Cheese
http://www.rpgcodex.net
Lawspeaker of Crossroads - Leader of Codexia - Keeper of the Cheese
http://www.rpgcodex.net
-
sabinati
- Posts: 15527
- Joined: Mon Jul 13, 2009 4:25 am
- Location: View active topics
Re: quality -429496728 honey
can't you just make the honey/wax output an average of the materials used to build it or something?
-
loftar
- Posts: 9096
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: quality -429496728 honey
Well, I did discover the cause of this particular bug, now. For some reason, I had expected that 0.0 / 0.0 would evaluate to 0.0, while in reality it yields NaN. I should've guessed, really. (And ((int)NaN) is -2^31.) This should, thus, not happen anymore.
Now there just remains the bug of the beehives yielding ridiculously LQ products.
Now there just remains the bug of the beehives yielding ridiculously LQ products.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
-
sabinati
- Posts: 15527
- Joined: Mon Jul 13, 2009 4:25 am
- Location: View active topics
Re: quality -429496728 honey
where is it even getting the 0.0 values from...?
-
Potjeh
- Posts: 11825
- Joined: Fri May 29, 2009 4:03 pm
Re: quality -429496728 honey
Why are you dividing by zero in the first place? Bad code gnome!
-
loftar
- Posts: 9096
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: quality -429496728 honey
I do recall thinking that I just wanted to try and see what happened (that is, verify whether it yielded 0 or NaN). Afterwards, I just may have forgotten about it. :)Potjeh wrote:Why are you dividing by zero in the first place? Bad code gnome!
"Object-oriented design is the roman numerals of computing." -- Rob Pike