In my game I’ve been trying to usea currency variable with a decimal point (to give a more realistic feel i.e. pounds and pence/dollars and cents) but whenever something is bought (so set currency -xx.xx) it ends up with a lot of extra spaces after the decimal place in the stats screen, generally not rounding up the final penny i.e. currency becomes xx.xx999999999999.
I’ve had a look round the forum, but couldn’t really spot anything similar, so was wondering if anyone else has got a work around. I’ve got a few ideas but not entirely sure how to impliment them.
Is there some way to set it so that it only displays two decimal places (and rounds up) or will it be better to set a pounds variable and a pence variable (with some form of clause to deal with pence going below 0 to make the maths work - which feels it could end up with some clunky code).
I also thought that there may be a way to display a decimal point in the stats screen, but be working with full numbers in the code (so the player sees xx.xx but the coding reads *create currency xxxx and when you get to buying something *set currency -xxxx).
If anyone has any ideas, it would be great to hear your thoughts! Thanks