#Format specifiers don't work

1 messages · Page 1 of 1 (latest)

floral zodiac
#
(('%02s' * ('§z' + #time_second)) - ('§z' + #time_second))

This code tries to insert a zero in the tens place when the seconds are single digits.

https://wiki.bedrock.dev/json-ui/json-ui-intro#format-specifiers

%0ns
Returns the full string if its length is n or more units, otherwise returns 0.

I tried using this, but it seems to work as follows:

%ns
Adds spaces to the start to make the total length n units, if needed.
Example: ('%15s' * $var) returns abcdefghijklmn.

``
('sss' + ('%09s' * ('§z' + #time_second)))

When I try this, I get the result shown in the image.
vital smelt
#

The zeroes were replaced by spaces

floral zodiac
#

Thank you. I have decided to use a method that does not use this format.

vital smelt