Jump to content

Skript Tutorial #2 - Indentation.


kegnh

Recommended Posts

Hello, my name is itskegnh, and ill be showing you how to use indentation in your scripts.
This tutorial assumes you've read my other tutorials.

Indentation is how you allocate sections of code to events (more about events in a later tutorial).
How do i indent? Well you pick one of the following common Indentation techniques:

  1. 4 Spaces
  2. 2 Spaces
  3. 1 Tab

I prefer to use 1 Tab but it is entirely up to you.
How do you indent?
You place the selection above after a colon (:)
For Example:

on join:
	send "Welcome!"

As you can see in this example, the line send "Welcome!" is indented by 1 tab.
This means that when the event is called (when a player joins), It will send Welcome.
When a colon (:) is at the end of a line, you always indent.

If you would like to see more of these (The Next: Simple Layout) leave a like or a comment! 👍. Have a nice day.

 

  • Like 1

Minecraft Ranks
[DEFAULT] - 9th October 2020
[PRO] - 21st November 2020
[PATRON] - 27th October 2021

Proficiency
Python - 8 Years
C/C++ - 5 Years
Skript - 4 Years
Javascript - 3 Year
Java - 1 Year

Links
Discord - kegnh#1234

 
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...