My first post, and I'm new to both coding and makings games.
I want to have 2 decimal places with my currency variable.
Scenario: I've built a little clicker app, which uses currency, and I have picked Dollars as the currency of choice.
A lot of my products are worth less than a whole Dollar and would break what I'm doing to use whole dollars, which means I need to use cents to 2 decimal places.
The issue I came across is that when money earnt as a single integer, eg $7.80, it displays as $7.9 - some people are thinking this is 9cents but also, it just does feel nice. or if it is $7.00, this shows as "$7". How do I force 2 decimal places at all times?
Im rounding to 2 decimal places on all transactions currently.
Here is what I have to try force the decimal places when the text doesnt have one or both decimal places visible:
"$" & (round(Cash * 100) / 100) & (Cash % 1 = 0 ? ".00" : "")
The forum hasnt been great for searching, or I dont know how to use it. Tutorial doesnt jump out with anything helpful.
Any skilled peeps out there with cool solutions for this?
-T2