Literals
Data values directly written in the script source code.
Any value written into the script source itself is a literal.
A literal is an absolute value stored in the code itself, rather than extracted from some expression during the program run-time.
Some expressions act as literals by writing a raw value into the compiled source code, but are not included in this section.

Boolean

Booleans are the true/false value-types.
The two boolean literals are true and false.
1
(true|false)
2
3
set {var} to true
4
if {var} is true:
5
if {var} is false:
Copied!
Occasionally, booleans can be exchanged with other types. The true and false values can be equated with 1 and 0 in some syntax. For some boolean comparisons, null will count as a false value.

String

Strings are the most common text value-type.
Strings are written inside "<text>" double-quotes.
1
set {var} to "my text here"
2
if {var} is "hello":
3
if "hello" contains "h":
Copied!
Strings do not support parsed inputs. Instead, they may be joined with the + operator.
1
set {var} to "hello " + "there"
2
set {var} to "hello " + {name}
3
set {var} to "hello" + newline + ":)"
Copied!
This is different from original Skript. A simple comparison is given below, for users that need help converting scripts to this format.
ByteSkript Version
SkriptLang Version
"hello " + {name}
"hello %{name}%"
"hello " + my_func() + " there"
"hello %my_func()% there"
newline + ":)"
"%newline%:)"

Integer

Integers are whole (non-decimal) numbers.
Integers are written directly in standard 0-9 numerals.
1
set {var} to 5
2
if {var} is -443:
3
if 66 > 21:
4
set {var} to {var} + 23
Copied!
Integers are between -2147483648 and 2147483647. If you need a smaller or larger value, use a long.

Double

Doubles are decimal numbers.
Doubles are written directly in standard 0-9 numerals. Almost all decimals should be handled as double form.
1
set {var} to 5.5
2
if {var} is 4.0:
3
if 66.5 > 21.5:
4
set {var} to {var} + 23.0
Copied!

Long

Longs are whole (non-decimal) numbers.
Longs are written directly in standard 0-9 numerals with the L suffix. Longs have a much greater limit than integers, but take up twice the space in memory.
1
set {var} to 5L
2
if {var} is -443L:
3
if 66L > 21000000000000L:
4
set {var} to {var} + 2L
Copied!

Float

Floats are smaller, less-precise decimal numbers.
Floats are written directly in standard 0-9 numerals with the F suffix. Floats take up less space in memory than doubles, but support fewer decimal places.
1
set {var} to 5.5F
2
if {var} is 4.0F:
3
if 66.5F > 21.5F:
4
set {var} to {var} + 23.0F
Copied!

RegEx

Regular expressions are a standard form of text-matching pattern.
RegEx is written inside /pattern/ slash-characters. A / character inside the pattern must be escaped with a backslash \.
1
set {var} to /hello there/
2
set {var} to /.+?/
3
set {var} to /[0-9]/
Copied!
Be careful! A double // marks a line-comment!

Null

The null value is an empty value, used when a variable or expression has no value.
1
(null|none)
2
set {var} to null
3
set {var} to none
4
if {var} is null:
5
if {var} is none:
Copied!
The null value is equal to other null values (all null values are the same - nothing.)