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.

Skript How to read Skript Syntax

Discussion in 'Tutorials' started by Ankoki, Dec 31, 2020.

  1. Ankoki

    Supporter

    Joined:
    Nov 5, 2020
    Messages:
    55
    Likes Received:
    11
    So I couldn't find any tutorials related to reading Skript syntax (yet I am blind so if i did miss one apologies), so I thought I'd break down how to read the syntax because it's one of the most fundamental things to understanding skript, yet many people struggle with it and rely on more advanced people telling them. So here is a basic way to understand skript's syntax!

    Basic Breakdown:

    [optional] - Text in square brackets are optional and do not have to be wrote for the syntax to work.

    (option1|option2) - Text in brackets split with a "|" are a choice, where you can choose option1, or option2.

    %string% - A type can be put between two percentage signs, and this requires text, such as "Hello" or a variable {_hi} which is set to text or the required type.

    Example:
    Code (Text):
    1. (message|send [message[s]]) %strings% [to %commandsenders%]
    First, there is a choice, between "message", and "send [message's']" (s in square brackets is a strikethrough character, so I've used 's' as a replacement). In the second option, [message's'] is optional, and so is the 's' on the end, so this can be "message" with the first option, or any of the following combinations for the second option: "send", "send message", "send messages". We will use "send" for the rest of this example.

    Next, the syntax takes in strings, such as "hello". We can also use a variable here as long as that variable contains text. Now, we have 'send "hello"'. This would work, and would send "hello" to the player which is in the current event.

    The final part of this is optional, where we can specify who we are sending this message too. Say this was in a command, and our first argument was a player, and we wanted to send them this message. We can specify them here. If we were to do that, we would have 'send "hello" to arg-1'.

    So the final result is:
    Code (Text):
    1. send "hello" to arg-1
    Hopefully this helped and if there's any feedback or anything i've missed, let me know :emoji_slight_smile:
     
    • Like Like x 2
  2. oToghty

    VIP Supporter +

    Joined:
    Sep 1, 2020
    Messages:
    142
    Likes Received:
    5
    You are indeed hot, I can confirm that!
     

Share This Page

Loading...