#(dotheflopboy) decimal number without sign
23 messages · Page 1 of 1 (latest)
(dotheflopboy) decimal number without sign
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
Can you explain what numbers would be valid and which are not?
I would like to have positive decimal numbers valid like 1 3.3 5.33 2 positions after the decimal point but no negative -1 -3.3 -55.55 or some with +2 +34 +3.3
Have a check for being greater than 0. For display reasons you could remove the +. To prevent more decimal places, you can round the input.
!t element.round_to
Rounds a decimal to the specified place.
For example, 0.12345 .round_to[3] returns "0.123".
math
ElementTag(Decimal)
how can i remove the + from the input
!paste
Help us help you by pasting your script to https://paste.denizenscript.com/New/Script and linking it back here.
Could you provide your script?
Content of Denizen Script Paste #122597: money system... pasted 2024/05/09 09:40:17 UTC-07:00, Paste length: 2145 characters across 56 lines, Content: money_system_euro: type: economy
Does it come to issues when using the economy script and providing +15 ?
Or is it just for display purposes?
!t server.economy_format
Did you mean to search for server.economy.format?
Returns the amount of money, formatted according to the server's economy.
Vault
ElementTag
You can make use of the format from your economy script
ie <server.economy.format[<[amount]>]>
ok, thanks for help