24.05.2011, 05:25
Hello all,
I want to format an integer to a string by filling the number with zeros if it's not enough big, like: "000015" or "012345"
I tried to do this:
but this does not seem to work.. can I do it somehow without a lot of conditional (even if they're shorthand) or do I need to create a function that returns a formatted string from the integer?
A bit help would be great,
Thanks
I want to format an integer to a string by filling the number with zeros if it's not enough big, like: "000015" or "012345"
I tried to do this:
pawn Код:
format(tdstr, sizeof(tdstr), "%6d", floatround(newval, floatround_floor));
A bit help would be great,
Thanks