How to determine empty $multiargs or $arg# #193


Open
  • L3thalBunny created this issue Dec 1, 2019

    Trying to make a command that behaves two ways. One way if no argument passed, another way if argument passed.

     

    example:

    homes_home_alias:
      command: /home
      type: RUN_COMMAND
      runcmd:
      - '$Script$%if%$multiargs==""'
      - '/essentials:home home'
      - '$text$a'
      - '$Script$%else%'
      - '/essentials:home $multiargs'
      - '$text$b'
      permission-required: false

    Expecting:

    command: /home

    output1: a

    command: /home farm

    output2: b

     

    Actual:

    output1: b

    output2: b

     

  • Forge_User_98674312 posted a comment Dec 2, 2019

    This is a must in my opinion. The latest update breaks this as well because I believe it requires an argument whether it's empty or not, it just provides an error otherwise.


To post a comment, please login or register a new account.