-
Notifications
You must be signed in to change notification settings - Fork 15
Language Overview
Mwexim edited this page Apr 10, 2021
·
4 revisions
Skript is a simple, intuitive, conventional scripting language made with Java.
- Simple means that everyone can start using Skript right now and make valuable progress. No programming experience is required to start learning it: it is easy to pick up, fun to code loads of stuff with and will help you grow in understanding the programming basics.
- How simple Skript may look at first glance, we want to preserve an intuitive code-base, so experienced developers have the right tools to develop whatever they prefer. You will find yourself at home while coding in Skript since it provides very similar functions to other simple languages like JavaScript and Python.
- This all is preserved by making the language conventional. This means that there is no class-like structure to create your own types: all types are predetermined by the parser. However, other people can extend this parser using add-ons, so they can expand the functionality of Skript beyond its current limitations.
The code block below will print in "Hello World" once loaded.
on script load:
print "Hello World"As you can witness, the code speaks for itself. If I'd show this to my grandma, she would still be able to understand what is going on. That's the power of Skript.
Like each language, Skript has a set of basic types. We do not call them primitive types, because that is not what they are defined as. Skript types correspond to Java classes, the object type is the supertype.
-
booleansare eithertrueorfalse. Skript provides alternatives likeon/offandyes/no. -
integersare both negative and positive numbers with no decimals. There practically no limit on these integers, hence why there isn't an unsigned variant. Examples could be100,234or-9999. You can use an underscore ('_') to format large numbers better, like1_000_000. -
numberscan be all possible numbers, with technically an infinite amount of decimals. All integers are by definition numbers, but not the other way around. Examples are1.03and-234.567