# Stats Example

The example script, *Stats Example (StatsExample.cs)*, can provide useful statistics about the current experience. Grab the file from the download link at the end of the page.

Instructions

Here is a step-by-step guide to using the script:

1. Download the script file from the download link at the end of this article.
2. Follow the instructions provided in [Working with scripts](/latest/creating-in-sansar/working-with-scripts.md) to upload the script and add it to an object.
3. Since this script has no special parameters to set, your script is ready. Save and build your scene.
4. If you want to verify if the script is running correctly, visit the built scene.
5. While visiting the scene, open the Chat app.
6. In the chat field, enter one of the commands listed below in order to get the desired information.

| **Command** | **Returned result**                                                               |
| ----------- | --------------------------------------------------------------------------------- |
| /help       | Provides information about the other commands.                                    |
| /fire       | Causes you to fire a cannonball.                                                  |
| /xpinfo     | Provides information about the current experience, including name, IDs, and more. |
| /listagents | Lists all agents currently in the scene.                                          |
| /mypos      | Tells you your current position within the scene.                                 |

[Creative Commons License](/latest/creative-commons-license.md)

Have more questions? Join our [Discord!](https://discord.gg/sansarofficial)


---

# 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://docs.sansar.com/latest/script-api-docs/example-scripts/stats-example.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.
