# Common Issues

## README

Before we proceed, please ensure the following:

1. You have followed [installation](https://docs.t1ger.net/resources/t1ger-tuning-system/installation "mention") correctly and every steps.
2. You have not touched nor edited files, except for `shared/` files.
3. You have not made any custom changes.

## Failed to insert job

If you are getting this message in the console, like this:

<div align="left"><figure><img src="https://2167335559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiDWIMbFBeXle-trOlk%2Fuploads%2FpuPMaNLpT7wBkxkYqthI%2Fimage.png?alt=media&#x26;token=add67c85-29be-418f-9ad6-da5f7f49907c" alt=""><figcaption></figcaption></figure></div>

1. go to `es_extended/server/modules/createJob.lua`
2. find the function called `ESX.CreateJob`
3. replace the function with this code:

```lua
--- Create Job at Runtime
--- @param name string
--- @param label string
--- @param grades table
function ESX.CreateJob(name, label, grades)
    if not name then
        return print('[^3WARNING^7] missing argument `name(string)` while creating a job')
    end

    if not label then
        return print('[^3WARNING^7] missing argument `label(string)` while creating a job')
    end

    if not grades or not next(grades) then
        return print('[^3WARNING^7] missing argument `grades(table)` while creating a job!')
    end

    local parameters = {}
    local job = { name = name, label = label, grades = {} }

    for _, v in pairs(grades) do
        job.grades[tostring(v.grade)] = { job_name = name, grade = v.grade, name = v.name, label = v.label, salary = v.salary, skin_male = v.skin_male or '{}', skin_female = v.skin_female or '{}' }
        parameters[#parameters + 1] = { name, v.grade, v.name, v.label, v.salary, v.skin_male or '{}', v.skin_female or '{}'}
    end

    MySQL.insert('INSERT IGNORE INTO jobs (name, label) VALUES (?, ?)', { name, label })
    MySQL.prepare('INSERT INTO job_grades (job_name, grade, name, label, salary, skin_male, skin_female) VALUES (?, ?, ?, ?, ?, ?, ?)', parameters)

    ESX.Jobs[name] = job
end
```

## Q/A

{% hint style="success" %}
**QB Inventory**\
[❓](https://emojipedia.org/question-mark/)  Inventory not opening with qb-inventory

[✔️](https://emojiguide.com/symbols/check-mark/) Download latest qb-inventory. If you don't want to update, then navigate to t1ger\_lib/framework.lua and find the OpenStash function. In here you want to comment out the triggerserverevent for the qb inventory and enable the commented out code.&#x20;
{% endhint %}

{% hint style="success" %}
**No such export GetSharedAccount in ESX Addon Account**\
[❓](https://emojipedia.org/question-mark/)  You are getting an error with no such export GetSharedAccount in resource esx\_addonaccount

[✔️](https://emojiguide.com/symbols/check-mark/) All you need to do is update your esx\_addonaccount to the latest: <https://github.com/esx-framework/esx_addonaccount>
{% endhint %}

asdasd
