# Troubleshooting Guide

## Error Codes

{% hint style="info" %}

#### Info

If you encounter an error code not listed below, please open a support ticket in the [Codesign Discord](https://discord.gg/codesign) for assistance.
{% endhint %}

### Server

* <mark style="color:red;">**6458145**</mark> - `adv_stats` column is missing from the database.
* <mark style="color:red;">**468454**</mark> - `vehicles` table is missing from the database.
* <mark style="color:red;">**46584645**</mark> - `impound` and `impound_data` columns are missing from the database.
* <mark style="color:red;">**5454**</mark> - `cd_garage_keys` table is missing from the database.
* <mark style="color:red;">**3122**</mark> - `cd_garage_privategarage` table is missing from the database.
* <mark style="color:red;">**1975**</mark> - The vehicle shown in the server side print hasn't been added to QBCore's shared vehicle table.
* <mark style="color:red;">**0985**</mark> - The hash for [a vehicle](https://i.imgur.com/Bj8RUa1.png) in your QBCore shared vehicle table is [formatted incorrectly](https://i.imgur.com/TE8SGo8.png). It’s currently a string, but it should use [backticks](https://en.wikipedia.org/wiki/Backtick) instead of [apostrophes](https://en.wikipedia.org/wiki/Apostrophe).
* <mark style="color:red;">**5111**</mark> - This warning appears when `Config.UseExploitProtection` is disabled. It likely means the `model` variable in the `vehicle/mods` column is missing for a player's vehicle. This could be caused by a faulty vehicle shop or, less commonly, a player using a cheat engine. To fix it, delete the vehicle or manually add the plate in the JSON file.

<pre class="language-sql"><code class="lang-sql"><strong>--esx
</strong><strong>SELECT * FROM owned_vehicles WHERE JSON_EXTRACT(vehicle, '$.model') IS NULL;
</strong>--qbcore/qbox
SELECT * FROM owned_vehicles WHERE JSON_EXTRACT(vehicle, '$.model') IS NULL;
</code></pre>

### Client

* <mark style="color:red;">**1654651**</mark> - The `plate` column in the `owned_vehicles/player_vehicles` table is `NULL` or not a string for one of this player's vehicles.

```sql
-- esx
SELECT * FROM owned_vehicles WHERE plate IS NULL OR plate = "";
--qbcore/qbox
SELECT * FROM player_vehicles WHERE plate IS NULL OR plate = "";
```

* <mark style="color:red;">**87458434**</mark>**&#x20;/&#x20;**<mark style="color:red;">**3216584884**</mark> - The `adv_stats` column in the `owned_vehicles/player_vehicles` table is `NULL` or not a table for one of this player's vehicles.
* <mark style="color:red;">**77745646844**</mark>**&#x20;/&#x20;**<mark style="color:red;">**66546544658**</mark>**&#x20;/&#x20;**<mark style="color:red;">**749864**</mark> - The `vehicle/mods` column in the `owned_vehicles/player_vehicles` table is `NULL` or not a table for one of this player's vehicles.
* <mark style="color:red;">**2472782**</mark> - The `garage_id` column in the `owned_vehicles/player_vehicles` table is `NULL` or not a string for one of this player's vehicles.
* <mark style="color:red;">**465146541**</mark> - The `property` column in the `owned_vehicles/player_vehicles` table is `NULL` or not a number for one of this player's vehicles.
* <mark style="color:red;">**6584165**</mark> - The `in_garage` column in the `owned_vehicles/player_vehicles` table is `NULL` or not a boolean. It should be a `TINYINT` (0 or 1).
* <mark style="color:red;">**013552**</mark> - The `plate` variable in the `vehicle/mods` column for one of this player's vehicles is missing. You can either delete this vehicle or manually add the plate in the JSON file.
* <mark style="color:red;">**3459**</mark> - Duplicate `garage_id` found in `Config.GangGarages` and `Config.Locations`. IDs must be unique.
* <mark style="color:red;">**68541545**</mark> - You are using a regular job garage but haven't added vehicles for that job in `Config.JobVehicles.RegularMethod`.
* <mark style="color:red;">**68445154**</mark> - Error in the `SpawnVehicle` function in `client/main/functions.lua`.
* <mark style="color:red;">**768415**</mark> - The `impound` column in the `owned_vehicles/player_vehicles` table is a boolean, but it should be a number.
* <mark style="color:red;">**434543522**</mark> - Error in the `GetFuel` function in `client_customise_me.lua`.

***

## Common Issues

Please check out our [**Self Debugging Guide**](https://docs.codesign.pro/coding-information/self-debugging#troubleshooting) before contacting our support.

🔔 <mark style="color:red;">**Folder Name**</mark> Make sure the name of the folder is `cd_garage`.

🔔 <mark style="color:red;">**Encrypted Files**</mark> Do not edit the encrypted files in any way.

<details>

<summary><mark style="color:red;"><strong>Screen Flickering?</strong></mark></summary>

**Example:** If your screen is flickering while using cd\_easytime.

**Reason:** This is due to you having multiple time/weather sync scripts running at the same time fighting each other eg., vSync or vMenu.

**Solution:** Stop the other time/weather script that is causing this or stop cd\_easytime and remove it from the dependencies in the fxmanifest.lua of cd\_garage.

</details>

<details>

<summary><mark style="color:red;"><strong>Is the impound Not Opening?</strong></mark></summary>

**Example:**  If you see a thin line on screen where the impound UI should be and you see a client F8 print saying "toLowerCase".

**Reason:** Database structure was different in old versions compared to new versions.

**Solution:** Part 1: Use the `cd_garage_jobvehicles` chat command in your server console before any player joins.

Part 2: Execute this SQL query in your database.

```sql
UPDATE owned_vehicles SET impound = 0, impound_data = '' WHERE impound > 0
```

</details>

<details>

<summary><mark style="color:red;"><strong>RGB Colours Not Saving Correctly?</strong></mark></summary>

**Example:** If your vehicles RGB colours are not saving when you store a vehicle or not applying when spawning a vehicle in the garage.

**Reason:** This is because you have not made the changes to your frameworks `GetVehicleProperties()` and `SetVehicleProperties()` functions that your mechanic/customs resource requires you to do.

**Solution:** Make required changes to `GetVehicleProperties()` and `SetVehicleProperties()` according to your mechanic/customs resource.

</details>

<details>

<summary><mark style="color:red;"><strong>"ExitLocation" client-side F8 error?</strong></mark></summary>

**Example:** If you see an error in the client-side F8 console similar to this example - `attempt to call a nil value (field 'ExitLocation')`.

**Reason:** This happens when you spam the button on the UI to spawn a vehicle too fast.

**Solution:** It does not break anything and can be ignored.

</details>

<details>

<summary><mark style="color:red;"><strong>Item(s) Not Found In Inventory Database/Table:</strong></mark></summary>

**Example:** If you get an error when the script or server start with the name of an item, such as `fakeplate`.

**Reason:** You have enabled `Config.FakePlates` but the fake plate item has not been added to your servers items.

**Solution:** The error message tells you the name of the item that is missing, add it to your servers items.

</details>
