#(dotheflopboy) decimal number without sign

23 messages · Page 1 of 1 (latest)

sage smelt
#

i would like to allow decimal numbers in an input but without a sign

tall forumBOT
#

(dotheflopboy) decimal number without sign

tall forumBOT
#

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.

woeful iris
#

Can you explain what numbers would be valid and which are not?

sage smelt
#

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

woeful iris
#

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

iron drumBOT
sage smelt
#

how can i remove the + from the input

woeful iris
#

!paste

iron drumBOT
woeful iris
#

Could you provide your script?

sage smelt
woeful iris
#

Does it come to issues when using the economy script and providing +15 ?

#

Or is it just for display purposes?

#

!t server.economy_format

iron drumBOT
#
Possible Confusion

Did you mean to search for server.economy.format?

iron drumBOT
woeful iris
#

You can make use of the format from your economy script

#

ie <server.economy.format[<[amount]>]>

sage smelt
#

ok, thanks for help