# Common problems

## Failed to verify protected resource

Files were possibly corrupted during transfer. Ensure hidden files are copied; the .fxap file in a protected resource must be included. Some FTP programs skip these files. \
\
<https://forum.cfx.re/t/introducing-asset-escrow-for-your-resources/4777151>

## You lack the required entitlement to use

Try restarting your server and make sure your server license key is correct. If you bought the resource on the wrong account, you can transfer it to another account on keymaster.\
\
<https://forum.cfx.re/t/introducing-asset-escrow-for-your-resources/4777151>

## Syntax error near '<\1>' or ERROR: attempt to call a nil value (field 'x')

In most cases, these errors happens because:

* `Config.Framework` is set incorrectly
* You are using old versions of some of the script files while others have been updated
* Some files are missing, not loading properly, or are corrupted

This issue is usually not caused by the script itself, so there is often nothing we can directly fix from our side.

What usually helps:

* Perform a fresh install of the script
* Make sure you copy all files properly when moving the script to your server (including the .fxap file)
* If you are updating the script, make sure you copy any new files that might have been added and  make sure to replace all files that were updated
* Double-check that nothing is missing after uploading
* If you are using FileZilla, try using WinSCP instead
* Clear both your server cache and your client cache

In many cases, a clean reinstall solves the problem.

## ERROR: Attempt to index a nil value (global ‘lib’)

If you use ox\_lib, make sure you add `shared_script '@ox_lib/init.lua'` to `fxmanifest.lua`. If you don't use ox\_lib, set `Config.UseOxLib` to false.

## ERROR: Unknown column 'x' in 'field list'

Make sure you import the sql included with the script to your server's database. If you are unsure how to do this, you can lookup a tutorial on Youtube for example.

## Changing currency symbol

Go to `locales/en.lua` (or the file for your chosen language) and update the symbol there.

If you are using esx\_tk\_mechanicjob and want to change from euro to USD:\
Go to `html/script.js` and change every\
`Intl.NumberFormat('fi-FI', { style: 'currency', currency: 'EUR' })`\
to:\
`Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' })` \
(other currencies can also be used by changing the `'en-US'` and `currency: 'USD'` [see here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat))

## Addon vehicle name showing as NULL

You need to add names for all your addon vehicles using `AddTextEntry`. This can be placed in any client-side script. For example:

```lua
AddTextEntry('gtr', 'Skyline GTR 17')
```

## Items not working on qb-core & ox\_inventory

Go to `ox_inventory/modules/bridge/qb/server.lua` and change function `server.UseItem` to this:

```lua
function server.UseItem(source, itemName, data)
    local cb = QBCore.Functions.CanUseItem(itemName)
    return cb and (cb.func and cb.func(source, data) or cb(source, data))
end
```

## 3rd party integrations not working correctly

We try to provide support for widely used resources such as phone systems, dispatch systems, housing scripts, etc.

However, we do not always own or use those scripts ourselves. Because of that, we cannot guarantee full compatibility with every third-party resource.

Most integrations are based on:

* Public documentation of other scripts
* Community provided examples
* Customer shared solutions

We will do our best to help, but in some cases you may need to adjust the integration yourself depending on your setup.


---

# 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://tk-scripts.gitbook.io/docs/common-problems.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.
