Azuriom / Plugin-Vote

A vote plugin to reward players when they vote.

Home Page:https://market.azuriom.com/resources/2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rewards for votes don't work when using decimals

RSLuke opened this issue · comments

commented

Bug description

Comme j'ai voulu l'expliquer sur Discord, actuellement le système de votes fonctionne à moitié, dès que l'on veut ajouter des récompenses avec des probabilités décimales, les récompenses s'emballent. Je m'explique :

En ajoutant une première récompense à 100%, tout fonctionne comme prévu
En ajoutant des récompenses à 10 et 1%, elles ont l'air d'être distribuées normalement.

Dès que j'ai commencé à ajouter des récompenses à 0.1 et 0.01%, les problèmes arrivent.

Ce que j'ai constaté :

  • Les récompenses à 0.1% n'ont JAMAIS été distribuées.
  • En ayant 2 récompenses différentes à 0.01%, l'une d'elle n'a jamais été distribuée tandis que l'autre a été distribuée à environ 100x sa probabilité initiale, comme si elle était à 1%

Constaté sur la base de 11 000 votes environ sur un mois, la seconde récompense à 0.01% a été récupérée plus de 100 fois alors qu'elle aurait dû être récupérée en moyenne une fois.


As I wanted to explain on Discord, currently the voting system works halfway, as soon as you want to add rewards with decimal probabilities, the rewards get carried away. Let me explain :

Adding a first 100% reward, everything works as expected
By adding rewards at 10 and 1%, they seem to be distributed normally.

As soon as I started adding rewards at 0.1 and 0.01%, the problems started.

What I observed:

  • 0.1% rewards were NEVER given out.
  • By having 2 different rewards at 0.01%, one of them was never distributed while the other was distributed at around 100x its initial probability, as if it were at 1%

Found on the basis of approximately 11,000 votes over a month, the second reward at 0.01% was collected more than 100 times when it should have been collected on average once.

Step to reproduce

Voici mon tableau de récompenses pour illustrer mes propos ci-dessus : https://prnt.sc/c_i1h5h_YXgO

La récompense 11 Test a remplacé la récompense 10 qui justement était drop anormalement mais elle est drop à la même probabilité soit environ 1% au lieu de 0.01%


Here is my reward chart to illustrate my comments above: https://prnt.sc/c_i1h5h_YXgO

The 11 Test reward replaced the 10 reward which was dropping abnormally but it is dropped at the same probability, i.e. around 1% instead of 0.01%

Errors / Logs

No response

Web server

No response

Database type

None

PHP version

No response

Additional context

Vous pouvez me contacter sur Discord : _Luke_#0001

You can contact me on Discord: _Luke_#0001