ID:165965
Oct 11 2006, 12:40 am
|
|
is there a way to add commas to my byond game?
|
In response to SuperSaiyanGokuX
|
|
all of thee above , ineed them for almost everything
|
In response to Rikishi
|
|
Rikishi wrote:
all of thee above , ineed them for almost everything SuperSaiyanGokuX wrote: You'll have to be more specific than that. Seriously, you really need to be specific. Tell us each place you'd like to use commas and how. Don't just say "Yeah, that's it" and expect we have a clue what you mean. Contrary to popular belief, nobody here can read your mind. Lummox JR |
In response to Lummox JR
|
|
I need them for the stat panel, and the outputing text.
IE if u take of 999 damage it will read as You were hit for [1,000] damage. Then just in the stat panel for like gold Gold: 23,000 it will need to be able to go in the millions |
In response to Rikishi
|
|
As far as I know, you'd have to do more thsn make a comma to do that.The game doesnt automatically know where to put the comma.You'd have to make some kind of checking proc.
|
In response to Dragon_fire6653
|
|
Dragon_fire6653 wrote:
As far as I know, you'd have to do more thsn make a comma to do that.The game doesnt automatically know where to put the comma.You'd have to make some kind of checking proc. You'd probably need num2text proc then add the commas in from a self made proc. |
In response to Rikishi
|
|
It seems a bit illogical to tell the player that they were hit for 1000 damage when they were actually hit for 999 damage. But run a forum search - I'm sure I've seen posts (with solutions) about adding commas to large numbers.
|
1) Do you mean inside the text that's output to the text area? If so, that's as simple as typing them into the text strings you're displaying to the player...
2) Do you mean inside the names of your mobs and objs? If so, the way to do this is by setting their name to a text string with the comma included (you can't define them with commas in the names, but you can add commas to a string used to overwrite their defined name)
3) Do you mean something else? If so, what?
There are a lot of ways to answer your question, and without more detail, we don't know which one you want...