> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-clothing-studio/troubleshooting.md).

# Troubleshooting

CAS Clothing Studio troubleshooting: designs not showing, restarts, full slots, database errors, AI Design errors and the Designs row in the clothing store.

## A design does not show after the export

A new or changed design reaches players only after a **server restart**, and each player must **rejoin** to load it. The export window and the **Saved** tab show **Waiting** or **Update waiting** until then, with the time of the next restart (`cs_restart_times`).

{% hint style="danger" %}
Never restart `cas-clothingstudio` on its own while players are online after an export. Streamed files that change under a running game can crash clients.
{% endhint %}

## A design says "Needs export"

Its files are gone from `cas-clothingstudio/stream/` (a reinstall, a folder copied over). Open it from the **Saved** tab and export it again.

## "Every slot is in use"

There are 400 slots. Delete old designs you no longer use: each slot is free again after the next restart.

## "The database refused the design"

Raise MySQL's packet limit in `my.ini` under `[mysqld]`: `max_allowed_packet=16M`, then restart MySQL. Or use fewer or smaller pictures.

## AI Design

| Message                           | What to do                                                        |
| --------------------------------- | ----------------------------------------------------------------- |
| AI Design is off                  | Set `cs_ai_provider` and `cs_ai_key` in `server.cfg` and restart. |
| The AI key was refused            | Check `cs_ai_key` for the provider set in `cs_ai_provider`.       |
| The AI account is out of credit   | Top it up at the AI provider.                                     |
| Slow down or the quota is used up | The provider's limit: wait a moment.                              |
| Another AI request is running     | One request at a time on the server: wait for it.                 |
| The AI took too long              | Try again.                                                        |

## No Designs row in the clothing store

* `cas-clothingstudio` is not running: the store then works as stock.
* The store is not near a town in `Config.Towns` (within `Config.TownRange`), and the character owns no design of this category. Add the store's town. See [Configuration](/script-documentation/cas-clothing-studio/configuration.md#towns).
* No live design of this category is sold in this town, for this body (men and women have their own garments).
* CAS Character Creator: only the clothing store sells designs, not the creator, the barber or `/editcharacter`. You need 2.1.0 or newer.
* vorp\_character or rsg-appearance: the patch is not applied, or the console shows no `clothing script integrated` line.

## The tailor counters are gone

With `Config.UseTailors = "auto"` they turn off while a supported clothing script is integrated: players buy and wear designs in the clothing store. Set `true` to keep them for buying.

## A design came off

* Rolled sleeves and tucks (`/sleeves`, `/tuck`): the game swaps the piece and drops the texture; the Studio puts it back within a few seconds.
* Character select previews show the plain garments; the designs appear once the character spawns.
* A shared outfit shows a design only to a character who owns it.
* A design given to a job goes away when the character leaves the job.

## Story characters show a design

Slots are story-only character textures. Servers that spawn the story characters (the `cs_*` peds) could show a design on them. The Studio uses the purely story ones first.
