# Using the Documentation

The documentation is one of the most important resources available to you.

{% hint style="info" %}
**"What's the documentation?"**\
The documentation (colloquially referred to as the 'docs') are websites that, well, document Skript. These pages (most notably Skript Hub's documentation and skUnity's documentation) are the most commonly relied upon tools to help everybody from beginners to experts write code. The docs list everything Skript offers, and explains how to use all of these different components to create scripts.
{% endhint %}

{% hint style="info" %}
To find links to the documentation, head to the [Documentation & Wikis page](/syntask/resources/documentation-and-wikis.md).

To keep everything consistent, it is probably easiest for you to use Skript Hub's documentation; as that is showcased in all examples here.
{% endhint %}

Now, you'll actually get started on figuring out what pieces you'll need to put together to create your example welcome script. Since this script will send a message when a player logs on, you'll need to search the documentation and discover how to:

* Detect when a player joins the server
* Send a message

Try searching the documentation for ways to do these two tasks. Again, for help navigating the documentation, see the [Documentation & Wikis page](/syntask/resources/documentation-and-wikis.md). If you get stuck, there are hints below.

<details>

<summary>Detecting when a player joins - HINT</summary>

Try inputting the keyword "join" into the search bar. This should yield a few results, but only one will detect when a player logs on to the server.

</details>

<details>

<summary>Detecting when a player joins - ANSWER</summary>

The `on join:` event can be used to activate code when a player joins the server.\
-> Link to the documentation page: <https://skripthub.net/docs/?id=1046>.

</details>

<details>

<summary>Sending someone a message - HINT</summary>

Search for keywords such as "send" or "message".

Note: "message" is the better keyword in this case. Using "send" for a query buries the desired result under a bunch of others.

</details>

<details>

<summary>Sending someone a message - ANSWER</summary>

The `send` effect (officially labeled the `message` effect) can be used to send a message.\
-> Link to the documentation page: <https://skripthub.net/docs/?id=1130>.

</details>

Great! Now you have the pieces you need to combine in order to write some code! Unfortunately, they might look a little complicated or you might not know how they fit together yet. Continue to the next page to get working code!


---

# 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/beginners-corner/using-the-documentation.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.
