> 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-advanced-inventory/troubleshooting.md).

# Troubleshooting

Fixes for common CAS Advanced Inventory problems on RedM. Other scripts cannot find the inventory, missing item pictures, usable items not working, clothes, commands and languages.

## Other scripts say the inventory is missing

The folder must be named exactly `vorp_inventory` (VORP) or `rsg-inventory` (RSG). Other scripts call it by that name. Make sure the old inventory is out of `resources` and that the start order is `oxmysql`, the core, then the inventory, then everything else.

## jo\_libs says "No compatible inventory found on your server"

Take 1.0.2 or newer: jo\_libs finds the VORP inventory by a line in its `fxmanifest.lua` (`vorp_github`), which 1.0.0 and 1.0.1 did not have. After the update, restart the whole server so jo\_libs looks again.

## Guns reload over and over

Fixed in 1.0.2. When the server console shows `[cas-inventory] ... had N AMMO_... in the game but N in the satchel`, a script gave rounds straight to the ped instead of through `exports.vorp_inventory:addBullets`. The satchel puts that type back to what it holds and leaves the other guns alone. Ask the author of that script to add ammo with `addBullets`.

## Usable items do nothing after a restart

Scripts register their usable items (and their stashes) with the inventory when they start. If you restart only the inventory while the server runs, those registrations are gone until those scripts restart too. **Restart the whole server** after changing or swapping the inventory.

## Item pictures are missing

Copy the pictures from your old inventory: `html/img/items/` (VORP) or `html/images/` (RSG). Pictures are looked up by item name, so `bread` needs `bread.png`. A slot without a picture shows the category icon. Check `Config.Images` if you keep pictures somewhere else.

## Players lost items after the swap

They did not: the inventory reads the same tables. If a satchel holds more stacks than `Config.Slots`, it grows and scrolls instead of hiding anything. Check that the server connected to the same database and that the folder name is right.

## Clothes do not come off or come back in the wrong colour

* Check which provider is used: `Config.OutfitProvider` in `config/clothing.lua` (`'auto'` picks murphy\_clothing, then cas-charcreator, then vorp\_character, then rsg-appearance).
* With cas-charcreator or vorp\_character, the commands in `Config.OutfitCommands` must match your character script's clothing commands.
* With Murphy's Clothing, rsg-appearance or the native mode, add your clothing pack's categories to `Config.OutfitPieces`.
* With Murphy's Clothing, keep the resource folder named `murphy_clothing` (the inventory finds it by that name).

## /trade or /search does nothing, or another script reacts

Another script may already use the command. Rename it in `Config.Commands` (for example `Search = 'frisk'`) or set it to `''` and start the search from your radial menu ([For developers](/script-documentation/cas-advanced-inventory/developers.md#starting-things-from-other-scripts)). A search also needs the other rider to have their hands up, be hogtied, cuffed or down.

## The hotbar number keys clash with other keys

With `Config.HotbarHoldOnly = true` (default) the hotbar only reacts while ALT is held. Players can also switch "Hotbar while holding ALT" in the settings (F1).

## The interface is too big or too small

Each player can set the interface size in the settings (F1), from 80% to 120%. The layout fits every resolution from 720p to 5K and ultrawide screens on its own.

## Texts show in the wrong language

Set `Config.Locale` and restart the server. A text missing from your language file shows in English. See [Languages](/script-documentation/cas-advanced-inventory/languages.md).

## Hunger and thirst meters are missing

The meters read CAS Metabolism, BLN HUD, Outsider Needs, VORP Metabolism, bcc-corehud, RSG Core's player metadata and the `hunger` / `thirst` state bags. With none of them running (or stopped) the meters stay hidden. Another metabolism script: return its values from `Config.Metabolism` (client) or `ServerConfig.Metabolism` (server), from 0 to 1.

## A stash does not open, or says it is not registered

Scripts register their stashes when they start. After a restart of only the inventory, stashes registered at another script's start (houses, for example) are gone until that script restarts. Restart the whole server. Horse saddlebags are registered when the rider picks their character.

## Weapon parts disappear when a gun is drawn

* vorp\_weaponsv2's own customization bench writes parts straight into the database. Turn its benches off (`customizationLocations = {}` in its config) and fit parts from the weapon screen or CAS Gunsmith.
* `Config.Weapons.Gunsmith` must be the folder name of CAS Gunsmith when you run it (`'cas-gunsmith'`).

## A gun has no 3D model on the weapon screen

The models are in `html/assets/w3d` and download with the resource the first time a player joins. A gun without a model in that folder shows its picture instead; it still works.

## /search says the rider cannot be searched

The other rider needs hands up, hogtied, cuffed or down. Your hands-up script must play the game's hands-up task or set the `handsUp` state bag. See [Stashes and other scripts](/script-documentation/cas-advanced-inventory/compatibility.md#searching-needs-hands-up).

## Portraits show the engraving instead of the Steam avatar

The rider has no Steam identifier (Steam not running, or no `steam_webApiKey` in `server.cfg`, which RedM needs for Steam identifiers), the Steam profile could not be reached, or `Config.SteamAvatars = false`.

## The satchel opens partly off the screen

Panels always move back inside the screen when the satchel opens. If a layout still feels wrong: Settings (F1) > **Panel positions** > **Put back**.

## Still stuck?

Open a ticket on [discord.gg/codeaftersex](https://discord.gg/codeaftersex) with your framework, the server console lines around the problem and what you did in game.
