#Need help with DM (possible) bug

1 messages · Page 1 of 1 (latest)

pearl gull
#

So I have this menu I made, which is a bank deposit system. I've run into an issue where a player is trying to deposit a coin, and it takes two "stacks" of it, but only provides the amount to vault from 1 of them.

I am using oraxen items for my physical currency.

I am not sure if I have made a mistake here with my left click commands or if this is a bug. Any help would be appreciated.

Menu:

size: 18
open_command: deposit_bank
items:
  'Deposit Info':
    material: 'basehead-eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTY0MzlkMmUzMDZiMjI1NTE2YWE5YTZkMDA3YTdlNzVlZGQyZDUwMTVkMTEzYjQyZjQ0YmU2MmE1MTdlNTc0ZiJ9fX0='
    slot: 0
    display_name: 'Information'
    lore:
      - 'Deposit Krona into your bank account, you have %cmi_user_balance_formated%'

  '1 Krona':
    material: 'oraxen-krona1'
    slot: 1
    display_name: 'Deposit 1 Krona'
    lore: ''
    left_click_commands:
      - '[console] cmi money give %player_name% 1'
      - '[console] oraxen take %player_name% krona1 1'
      - '[message] &aYou Deposited 1 Krona'
    left_click_requirement:
      requirements:
        krona1_check:
          type: has item
          material: "PAPER"
          modeldata: 1025
          amount: 1
      deny_commands:
        - '[message] &cYou do not have 1 Krona!'


  '5 Krona':
    material: 'oraxen-krona5'
    slot: 2
    display_name: 'Deposit 5 Krona'
    lore: ''
    left_click_commands:
      - '[console] cmi money give %player_name% 5'
      - '[console] oraxen take %player_name% krona5 1'
      - '[message] &aYou Deposited 5 Krona'
    left_click_requirement:
      requirements:
        krona5_check:
          type: has item
          material: "PAPER"
          modeldata: 1046
          amount: 1
      deny_commands:
        - '[message] &cYou do not have 5 Krona!'


  '10 Krona':
    material: 'oraxen-krona10'
    slot: 3
    display_name: 'Deposit 10 Krona'
    lore: ''
    left_click_commands:
      - '[console] cmi money give %player_name% 10'
      - '[console] oraxen take %player_name% krona10 1'
      - '[message] &aYou Deposited 10 Krona'
    left_click_requirement:
      requirements:
        krona10_check:
          type: has item
          material: "PAPER"
          modeldata: 1040
          amount: 1
      deny_commands:
        - '[message] &cYou do not have 10 Krona!'


  '100 Krona':
    material: 'oraxen-krona100'
    slot: 4
    display_name: 'Deposit 100 Krona'
    lore: ''
    left_click_commands:
      - '[console] cmi money give %player_name% 100'
      - '[console] oraxen take %player_name% krona100 1'
      - '[message] &aYou Deposited 100 Krona'
    left_click_requirement:
      requirements:
        krona100_check:
          type: has item
          material: "PAPER"
          modeldata: 1081
          amount: 1
      deny_commands:
        - '[message] &cYou do not have 100 Krona!'


  'Exit':
    material: 'basehead-eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvN2VmOGNjOTQxNjM5N2RlN2UxZWJjNjk2NDA0ZjkyY2YzZDA0NTdkNzMyMDJkOWYzNTkzYmNjZGJhZDdmNzkyMSJ9fX0='
    slot: 17
    display_name: 'Return to Main Page'
    lore:
      - 'Click to return'
    left_click_commands:
      - '[console] dm open banker_menu %player_name%'
    right_click_commands:
      - ''```
plush verge
#

Hey @pearl gull

#

It looks like u r experiencing an issue with your bank deposit system where the commands may be incorrectly processing the deposite.

pearl gull
#

Yeah I don't know if its deluxemenu's requirements thats the issue or if the console is messing up or oraxen commands being weird. I'm currently trying to determine that

plush verge
#

to confirm it, you should use consoles

#

so first, you can test by removing the left_click_requirement to check if DeluxeMenus' itemchecking is affecting the behavior.

#
left_click_commands:
  - '[console] oraxen take %player_name% krona1 1'
  - '[message] &eRemoved 1 Krona'
  - '[console] cmi money give %player_name% 1'
  - '[message] &eGave 1 Krona to player'
  - '[message] &aYou Deposited 1 Krona'
plush verge
#

are you still there?

pearl gull
#

yeah sorry had to do some stuff for work. I also wanted to mention this does not happen every time a player tries to deposit a coin, I haven't been able to replicate it more than once or twice. When I have the coins in a stack, it takes them one at a time like its supposed to, but I also just tested it like the above video, with 1 coin per slot, and it took both.

I'm going to test the above code you sent right now

#

and this is what the console shows

plush verge
#

Plz DM me so that talk over in more details