Jump to content

price rounding

Closed 1.3.1 1.3.3

ZIZI
  • in Shop
ZIZI

Posted

Hello. How do I change the rounding to 0.0000?

ZIZI

Posted

"Number of digits after decimal point for rounding prices": 5

Doesn't work, the economics plugin shows and calculates correctly from other plugins

ZIZI

Posted

I figured it out:
My configuration was transferred from 2.6.1

however if you change:

  "Formatting Settings": {
    "Buy Price Format": "0.0000",
    "Sell Price Format": "0.0000",
    "Shopping Bag Cost Format": "0.0000",
    "Balance Format": "0.0000"
  },

it correctly displays only product prices, and the player’s balance is only 0.00

I propose to add additional changes to the configuration to adjust the display of the correct player balance data:

return Math.Round(Convert.ToDouble(plugin.Call(BalanceHook, player.userID)), 2);
change on =>
return Math.Round(Convert.ToDouble(plugin.Call(BalanceHook, player.userID)), 5); ///_config.RoundFormatting

 

MeventSupport

Posted (edited)

Kk, we’ll add to the update! 

Edited by MeventSupport
Nomad3211

Posted

Hi there! 
In order to achieve the Ideal number formatting that you are going for, 
You must add an "N" in the  price format in front of the zero. 
Like so: 

"Buy Price Format": "N0" -> will make your number look like this: 1,000,000
"Buy Price Format": "N1" -> will make your number look like this: 1,000,000.0
"Buy Price Format": "N2" -> will make your number look like this: 1,000,000.00
"Buy Price Format": "0" -> will make your number look like this: 1000000

N and then the number of decimal places you want essentially. 

This worked for me, I hope it works for you! 

  • Love 1
Mevent

Posted

Changed Status from Pending to Closed

Mevent

Posted

Changed Fixed In to 1.3.3

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.1k

Files Sold

Total number of files sold.

2m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.