Jump to content
Korean Random
Sign in to follow this  
Tytoo

Help for digit formatting

Recommended Posts

Hello =)

 

I'm in the process of adding the remaining HP of tanks on the player panels on my XVM configuration and i'm having trouble with the formating.

 

 

I would like to format the HP like so:

[1250] //In a case where the HP is 4 digit long

[ 850] // In a case where the HP is 3 digit long

 

Yet, i think i can make it work when the HP is 4 digit long with: {{hp%4d|N/A}}

This give me a nicely aligned column.

Fwshtmu.png

 

However, with 3 digit HP number, it's not working anymore

All the column are disorganized. It's not good

BatUYpU.png

 

I found a way around it by padding "0". However, i would like a cleaner way of doing it.

P0rkp4W.png

 

 

Thanks in advance for anyone trying to help me out. Also, i would appreciate if anyone have nice documentation about formatting for XVM. I'm unsure what language formatting system i should use.

Share this post


Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...