Closed RiskingTime closed 6 years ago
I think that this may be a two-part problem:
First appears to be a problem with the affiliate calculation. For this I would investigate the "node/affiliate_plugin.js" file, focusing on the RPC_jackpot_gen
and RPC_dividend_gen
functions.
The second part will begin by looing into the buildStatsTables
function in the "html/stats.js" file to determine if the calculations beiong there are the cause of the problem or if the data being returned via the getInvestmentStats
RPC function (the next to investigate).
btc_total
column value from database (from jackpot table)RPC_getGameResults
function to see how jackpot is being calculated.total
column from "jackpots" table -- all values and calculations should be done in BTC (update affected 'game_server' code as well)Add additional base_btc
column to jackpots
and add section to game_server code to reset jackpot amount to this value when jackpot is won.
Ensure that the amount is also being subtracted from the bankroll on a win.
I'll take an additional hour to investigate this issue further and follow up with a revised estimate.
After additional investigation I would estimate that this task will take approximately 4 hours and involve changes to a number of both client-side (browser), and server-side (Node.js) files, as described above.
ok, please proceed. let me know when its complete
Changes have been pulled to the dev server (http://myfruitgame.com) and may be tested immediately.
Complete list of code-level fixes and updates is listed in the associated commit (https://github.com/CoinRoster/slotmachine/commit/13f63738d3ed95b4efe9d42550e689b0c5d1fa62).
ok, I'll start testing
looks like the decimal is in the wrong place, jackpot should start at 0.05 (100x the max bet)
I've updated the base BTC value in the database and changed the starting jackpot value to reflect this. Please refresh your browser to see the changes.
the liability on http://myfruitgame.com/stats.php should be the difference between the current jackpot and its base level, so as an example = 0.055 - 0.05 = 0.005
at the moment, it looks like the current jackpot amount and the bankroll liability are the same number
I'm gonna start running it till we hit the jackpot a few times to see what happens when it resets
Regarding your earlier comment (liability calculation), a fix has been made live on the development server. The commit for it is: https://github.com/CoinRoster/slotmachine/commit/b767db08cc8a1d45b4b70324de22af492d79a42c
I'm re-opening this issue because I found another bug, the jackpot isn't paying out properly, looks like its paying out double (maybe the progressive amount and also the fixed amount are both paying out?) attached are images showing the numbers,
Understood. I'll investigate and follow up with findings and an estimate if the fix appears to be extensive (my initial impression based on the information above suggests that it's not an extensive fix).
Update for jackpot calculation issue has been committed (https://github.com/CoinRoster/slotmachine/commit/96b8e6b1ca5e8e341f2c4876f7363b747225e12b) and can be reviewed on the dev server now.
looks like the jackpots are calculating, displaying, and paying out accurately right now. I'm closing this issue
@Patrick-Bay at the time of writing, the jackpot value showing on the game page is 12 digits long, this must be a bug/error since the max number of digits should be 8 and also since 1% of the value of each bet is added to the jackpot and the bet size max is 0.0005, each bet should add (0.0005 * 0.01) = 0.000005 to the jackpot
the value of the slotjackpot1 showing on the stats page is also incorrect (and also doesn't match the game page) at the time of writing the stats page is showing a jackpot value of 1.88771692
Can you let me know how long it might take you to determine what is causing these errors and outline a way to fix these bugs/errors?