# Structures

Structures are the starting point of all code in Skript. All other code must be nested within a structure so Skript knows when to run it. In many other languages, code can just be run right in the file without a structure. Skript's equivalent of this is the `on load:` event.

{% hint style="warning" %}
Note that each structure is it's own "master section", and must be separate from other structures. Structures can only be the first line of a code chunk, and cannot go within any other structures, or sections.
{% endhint %}

There are three main kinds of structures:

* Events (start with `on`)
  * (Special events called periodical events start with `every`)
* Commands (start with `command`)
* Functions (start with `function`)

Each has their own unique strengths, but also limitations. This section will go over each option and how to use them.

There are also `options:`, `variables:`, and `aliases:` structures that can be used.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://x8ight.gitbook.io/syntask/fundamentals/structures.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
