#my code not working

1 messages · Page 1 of 1 (latest)

thorny heath
#

hello, why following buttons not working? i click the button with eartharmor permission true, but action is not executed!!! ``` 'level1':
material: GREEN_STAINED_GLASS_PANE
data: 1
slot: 20
priority: 1
left_click_commands:
- "[givepermission] bending.ability.eartharmor"
click_requirement:
stop_at_success: true
requirements:
requirement_name:
type: has exp
level: 5
view_requirement:
requirements:
permission:
type: has permission
permission: bending.ability.eartharmor
display_name: '&f&lУровень 1'
lore:
- '&a&l[ОТКРЫТО]'
- ''
- '&e&lОткрывает способности:'
- '&e&lEarthArmor'
- '&a&lЦена 5000$ и 10 уровень'

'level1_closed':
    material: RED_STAINED_GLASS_PANE
    data: 1
    slot: 20
    priority: 2
    display_name: '&f&lУровень 1'
    lore:
        - '&4&l[ЗАКРЫТО]'
        - ''
        - '&e&lОткрывает способности:'
        - '&e&lEarthArmor'
        - '&a&lЦена 5000$ и 10 уровень'```
random coral
#

click_requirement is for click_commands
left_click_requirement is for left_click_commands

#

Also your type: has exp for the click requirement is improperly indented

#

Notice your view_requirement, that is correctly indented

#

Also, you don't need stop_at_success: true

thorny heath
#
    
    'level1:
        material: GREEN_STAINED_GLASS_PANE
        data: 1
        slot: 18
        priority: 1
        left_click_commands:
           - "[givepermission] bending.ability.eartharmor"
           - "[takeexp] 5L"
           - "[sound] UI_TOAST_CHALLENGE_COMPLETE 1 1"
           - "[message] &d&lВы ощущаете в &9&lcебе новые &4&lсилы&d!"
        left_click_requirement:
            requirements:
                requirement_name:
                    type: has exp
                    level: 5
        view_requirement:
            requirements:
                permission:
                    type: has permission
                    permission: bending.ability.eartharmor
        display_name: '&f&lУровень 1'
        lore:
            - '&a&l[ОТКРЫТО]'
            - ''
            - '&e&lОткрывает способности:'
            - '&e&lEarthArmor'
            - '&a&lЦена 5000$ и 10 уровень'

    'level1_closed':
        material: RED_STAINED_GLASS_PANE
        data: 1
        slot: 18
        priority: 2
        display_name: '&f&lУровень 1'
        lore:
            - '&4&l[ЗАКРЫТО]'
            - ''
            - '&e&lОткрывает способности:'
            - '&e&lEarthArmor'
            - '&a&lЦена 5000$ и 10 уровень'
#

[00:06:46 WARN]: [DeluxeMenus] Has Exp requirement at path: items.level1.left_click_requirement.requirements.requirement_name does not contain an amount: entry

thorny heath
#

help pls

random coral
#

You need amount not level

#

The error tells you

thorny heath
#

amount 100 it’s 7 level

random coral
#

I don’t know what you mean but I can’t help right now

#

Check the wiki maybe you can

whole rootBOT
#
Wiki Result:

Requirements - HelpChat Wiki
Everything about DeluxeMenus requirements! ... match the output) you can simply add the exclamation mark before the type name (like this type: "!has exp" ).

random coral
#

amount: 7
level: true

thorny heath
#

thx you!

thorny heath
#

@random coral

#

its not worked again

#
    'level1':
        material: GREEN_STAINED_GLASS_PANE
        data: 1
        slot: 21
        priority: 1
        left_click_commands:
           - "[givepermission] bending.ability.eartharmor"
           - "[takeexp] 5L"
           - "[sound] UI_TOAST_CHALLENGE_COMPLETE 1 1"
           - "[message] &d&lВы ощущаете в &9&lcебе новые &4&lсилы&d!"
        left_click_requirement:
            requirements:
                requirement_name:
                    type: has exp
                    amount: 5
                    level: true
        view_requirement:
            requirements:
                permission:
                    type: has permission
                    permission: bending.ability.eartharmor
        display_name: '&f&lУровень 1'
        lore:
            - '&a&l[ОТКРЫТО]'
            - ''
            - '&e&lОткрывает способности:'
            - '&e&lEarthArmor'
            - '&a&lЦена 5000$ и 10 уровень'

    'level1_closed':
        material: RED_STAINED_GLASS_PANE
        data: 1
        slot: 21
        priority: 2
        display_name: '&f&lУровень 1'
        lore:
            - '&4&l[ЗАКРЫТО]'
            - ''
            - '&e&lОткрывает способности:'
            - '&e&lEarthArmor'
            - '&a&lЦена 5000$ и 10 уровень'```
random coral
#

what isn't working exactly

#

what does it do now

#

it looks like your view requirements are backwards

#

the closed item should be priority 1, with view requirement

#

the regular item should be priority 2, no view requirement

thorny heath
#

i have a 5 level but nothing happens on left click

thorny heath
#

it breaks all

#

without permission i see the open

random coral
#

I think nothing is happening because you are seeing the closed item

#

because you don't have permission

#

This is how it should be:

it looks like your view requirements are backwards
the closed item should be priority 1, with view requirement
the regular item should be priority 2, no view requirement

#

@thorny heath

#

I noticed your other post just now