1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Multiple parser marks

Discussion in 'Java' started by Goose, Jan 12, 2021.

  1. Goose

    Supporter

    Joined:
    Nov 23, 2019
    Messages:
    430
    Likes Received:
    30
    Hello, I'm working on an addon dedicated to particles, and currently I'm making an expression to draw a line that the player can (optionally) change the density and distance between particles of. This seems to require multiple marks, but obviously the parser.mark can't be both 1 and 2 (if the user changes both density and distance.)

    How are multiple parser marks handled in Skript is what I'd like to know.

    Thanks for your time.
     
  2. BaeFell

    BaeFell I'm Poppy
    Admin skUnity Legend

    Joined:
    Nov 27, 2016
    Messages:
    952
    Likes Received:
    228
    Hey Goose! I've found it easier to use optionals.
     
  3. CharcoalToast

    CharcoalToast Member

    Joined:
    Mar 10, 2018
    Messages:
    21
    Likes Received:
    4
    Skript ORs both the marks.
    It can be that the operation is actually an XOR, but as far as I know they changed this to OR.

    Basically, if you have parse marks 1, 3 and 7 for example, the resulting parse mark will be
    Code (Text):
    1. (1 | 3)| 7
    That said, you should really provide your syntax as we may find an alternative that does not require 2 parse marks. Try to focus on what you want to achieve and not what the problem is the next time, because then it is easier for us to help you.
     
  4. Goose

    Supporter

    Joined:
    Nov 23, 2019
    Messages:
    430
    Likes Received:
    30
    Hey Toast! Thanks for the answer, I saw that the parse mark is XOR'd in skript-reflect but I was unsure if that was the case in Skript too.

    The syntax in mind was
    Code (Text):
    1. line from [(point|location)] %location% to [(point|location)] %location% [1¦with density %number%] [2¦distanced by %number% [meters]]
    if you would still want it. (Noticing now that you said next time so I could be helped easier but I've already received the answer I wanted, oh well.)
     

Share This Page

Loading...