> 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-redm-cars/troubleshooting.md).

# Troubleshooting

Fixes for common CAS RedM Cars problems. Cars not appearing, crashes on restart, the Repair Kit not usable, database errors, missing plates and more.

## The cars do not appear, or appear without parts

* Check the start order in [Installation](/script-documentation/cas-redm-cars/installation.md): `cas-carplates`, then `cas-car1910`, then `cas-carpack`.
* The cars stream when a player joins. After adding the scripts, restart the server and join again.

## A player's game crashed when a script was restarted

`cas-car1910` and `cas-carpack` stream models and data files. Restarting them while players are online can crash those players. Restart the server, or make sure nobody is online. The dealership, garage, HUD, fuel and repair scripts can be restarted with players online (`cas-fuel` stops when `cas-car1910` restarts: start it again).

## The Repair Kit does nothing when used

* The item must be in the `items` table with `usable = 1`, and the server must have been restarted after adding it.
* After a restart of vorp\_inventory on its own, every script that registered usable items must start again. Restart the whole server instead.
* The console should show `[cas-carrepair] ready (vorp)`. If it shows no framework, start `vorp_core` and `vorp_inventory` before the repair script.

## "No motor car close enough" / "Turn the engine off first"

Stand next to the car (within 5 m of its middle), get out of any vehicle and switch the engine off with **X** before using the kit.

## Database errors at start ("unable to execute a query", ECONNRESET)

The database was not ready when the server started, often when MySQL starts at the same time as the server. Start MySQL first, then the server. The scripts create their tables on the next start.

## A car bought at a dealership did not come out

* It is kept in the garage. Open the garage and **Retrieve** it.
* A car still being brought round when its owner left waits in the garage.

## The garage says the car is lost

Cars left on the road when their owner leaves become lost. Recover them at a garage for a fee (see [Garage](/script-documentation/cas-redm-cars/garage.md)).

## Plates are blank or missing

`cas-carplates` must be started before `cas-car1910`. Staff-spawned cars get a random plate. Owned cars get their registered one when they are brought out of the garage.

## The Store Vehicle prompt does not show in a car

* Drive to within 15 m of the garage entrance and stop in the driver seat.
* The car must be your own garage car.

## Keys do not work in the car

The in-car keys are key mappings. A player who changed them in the game's key settings uses their own keys. The hint shown while the car stands still lists the default ones.

## Still stuck?

Turn on `Config.Debug = true` in the script's config, restart it and send us the console output.
