Market.deal() bug (reducing amount by 1)


  • SUN

    When I execute Game.market.deal(), buying some staff, it (sometimes) reduces the factual buy amount by 1.

    Example: I've got 999 instead of 1000.

    http://i.imgur.com/W39iGCm.png

    .deal() was executed with amount=1000, there was more than enough energy @ my terminal; there was more than enough mineral @ the sellers terminal.

    It doesn't happen often, but regularly.


  • SUN

    This issue still exsists. Another case: 1000 energy sell E72S48->W63S52 == 999 energy in fact (tick 17366532)


  • CoPS

    As far as I recall, this is a javascript issue where all numbers are stored as double precision floats, and thus round... interestingly on occasion. I've seen it in a few places outside just the market.



  • I have seen this occur as well. It is still happening.

     


  • SUN

    Fresh screenshot: 0_1503859361415_energy1.png

    This bug is 7 months old now. He lives much longer than any of my creeps.

    Thus, anoint it The Bug Forever.


  • Dev Team

    We're working on a new market data storage implementation, all credits will be always in 0.001 precision, and stored as whole numbers of thousandths in the database, it will solve this along with many other issues.