#dynamic amount not working?

1 messages · Page 1 of 1 (latest)

gloomy field
#

I have tried using the dynamic amount for an item in one of my menus but it seems to not be working i have tested it with a few placeholders that return a numeric value. for example this one dynamic_amount: '%vault_eco_balance%' but even though my balance is set to 10 the item is still displayed as 1. I use the 152 dev builds of dm in a 1.19.3 server and ye i have the vault expansion downloaded

prisma holly
#

Hey @gloomy field try double quotes

gloomy field
#

oh oke

prisma holly
#

fs

gloomy field
#

nop still same thing

prisma holly
#

hmm

#

can you send me your full menu

#

?paste

twin copperBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

gloomy field
#

sure

#

i ve also tried the latest dev build and still same issue :/

prisma holly
#

can you try with other placeholders

gloomy field
prisma holly
gloomy field
#

eh for some reason it seems that it doesnt return the value of "currency" ?

#

cause it returns the "%statistic_leave_game%" pretty fine

prisma holly
#

wym

gloomy field
#

eh i think its not an issue

#

its just the dynamic_amount that doesnt return decimal numbers

prisma holly
#

OH it has decimals

#

that can def be the issue

#

Try a placeholder with no decimals? maybe seeing what that does

gloomy field
#

yeah the non decimal placeholders work

#

i ve tried the %vault_eco_balance_formatted%

#

the %vault_eco_balance% returns a decimal number

#

but ye the decimals doesnt work as an amount

prisma holly
#

Okay ill note it

#

@ivory dome 🙂

ivory dome
prisma holly
#

can you check

#

ty

#

since you added it

#

I think

ivory dome
prisma holly
#

I mean

#

fix

ivory dome
#

what?

prisma holly
#

or support decimals ?

#

with dynamic_amount

ivory dome
#

umm

#

I don't think it's possible to have 3.2012345 grass blocks in minecraft? 🤣

prisma holly
#

well round up

#

for decimals?

#

or ignore decimals?

#

anything after the . is nothing?

ivory dome
#

I mean, maybe? Idk. I did not make that feature tho. I'll open an issue either way

prisma holly
#

oh ok 🙂

ivory dome
#

we'll probably just end up doing rounding to closest, so x.[0-5) gets rounded to x and x.[5,9] gets rounded to x+1 or whatever. but not happening today

ivory dome
#

@gloomy field If you want to test, this is the latest 1.13.7 DeluxeMenus build + a fix for your problem. This works by completely dropping the decimal points from the number.

So if your placeholder returns 2.00 or 2.41241 or 2.9523523, the amount will be 2.

#

Please let me know if it works or if it doesn't.

gloomy field
#

oh lol that was fast

#

sure give me 5min

gloomy field
ivory dome
#

Alright. I have created a Pull Request and will wait for someone to be available to review it after which it should show up as a build on jenkins.

gloomy field
#

awesome

#

i ll use your build till then :d