diff --git a/stats.js b/stats.js index dd5e048..ad764dc 100644 --- a/stats.js +++ b/stats.js @@ -12,9 +12,9 @@ for (var uid in PrankData) { nbPrank ++; nbCrepe += parseInt(PrankData[uid].amount) if (userPrank[PrankData[uid].creator]) { - userPrank[PrankData[uid].creator] += nbCrepe; + userPrank[PrankData[uid].creator] += nbPrank; } else { - userPrank[PrankData[uid].creator] = nbCrepe; + userPrank[PrankData[uid].creator] = nbPrank; } } } @@ -26,5 +26,5 @@ console.log("Nombre de mission mission achevé: " + nbPrank) console.log("Nombre de crêpe servis: " + nbCrepe) console.log("Nombre moyen de crêpe par demande: " + meanCrepe + "\n") for (var user in userPrank) { - console.log(user + "a commandé " + userPrank[user] + " crêpe") + console.log(user + " a commandé " + userPrank[user] + " crêpe") }