How do I get a stat panel to display something like "$1.00" instead of "$1"?
This is for my 8k so I'd prefer there wasn't a 500-line code to do it with, but if its kinda short I probably have extra room :)
ID:168793
Aug 26 2005, 4:29 pm
|
|
In response to Popisfizzy
|
|
well I might have values like 1.39 or 55.21 :P
EDIT: how about... var/X = "[src.money]" I'll try that maybe yay |
In response to Cowdude
|
|
thats what the if() would be for. If there would be numbers on the end, don't show .00.
|
In response to Popisfizzy
|
|
if(round(src.money*10)/10 == src.money) that's what I needed. :) |
In response to Cowdude
|
|
Was what I said useful then?
|
This is for my 8k so I'd prefer there wasn't a 500-line code to do it with, but if its kinda short I probably have extra room :) proc/num2currency(num) Kinda large but you could probably shave off some bytes shrinking the labels and removing whitespace :P. |
In response to Theodis
|
|
len! that's what I needed! x_x oh well mine's shorter than yours :P
EDIT: (I didn't see Fizzy reply :P) I didn't understand what you meant by if :D I figured it out myself :) |
Or something along those lines?