#Issues with javascript check

1 messages · Page 1 of 1 (latest)

agile copper
#

Hey! Would appreciate some help with the menu I am creating.
Tried to do the expression without %player_name% before, tried with success_commands but either way I'm not getting it to work correctly.
Any input is appreciated :D
(Pls ping me on reply)

    left_click_requirement:
      requirements:
        has_money_check:
          type: javascript
          expression: '%player_name% %hollowrealms_hollows% >= 1000'
      deny_commands:
        - '[message] &cYou do not have enough Hollows!'
        - '[sound] BLOCK_ANVIL_USE'
    left_click_commands:
      - '[console] balance take hollows %player_name% 1000'
      - '[console] ws changeRace %player_name% Elve'
      - '[sound] BLOCK_BAMBOO_WOOD_BUTTON_CLICK_ON'
silk coral
#

I'm not overly well-versed with JavaScript placeholders, but you definitely need to remove the %player_name%:
'%hollowrealms_hollows% >= 1000'
When you do this and left-click, are there any console errors?

agile copper
silk coral
#

The fact that the commands are being executed infers that DeluxeMenus believes that the expression is true.
I would alternatively suggest:

    left_click_requirement:
      requirements:
        has_money_check:
          type: ">="
          input: '%hollowrealms_hollows%'
          output: 1000
agile copper