# Common Errors

In this section, you will find answers to commonly encountered issues. Remember that most errors stem from incorrect configuration, lack of required resources, or insufficient modification.

Bear in mind that troubleshooting requires patience and precision. Try to carefully analyze the errors and systematically review possible solutions.

If the issue persists after verifying the configuration and available resources, please contact the support on the VMS Discord.

***

<details>

<summary>ESX license invalidation, requires script restart to refresh player licenses in menu</summary>

To refresh the player's licenses, you need to execute an event to him to update the list of licenses, the following code shows the modified esx\_license code

**esx\_license/server/main.lua**

```lua
RegisterNetEvent('esx_license:removeLicense')
AddEventHandler('esx_license:removeLicense', function(target, licenseType, cb)
    local xPlayer = ESX.GetPlayerFromId(source)
    if xPlayer then 
        if Config.allowedJobs[xPlayer.getJob().name] then
            local xTarget = ESX.GetPlayerFromId(target)
            if xTarget then
                RemoveLicense(xTarget.getIdentifier(), licenseType, cb)
                --# Start of modified code
                Citizen.CreateThread(function()
                    Citizen.Wait(1000)
                    TriggerEvent('esx_license:getLicenses', target, function(licenses)
                        TriggerClientEvent('vms_driveschoolv2:cl:getLicenses', target, licenses)
                        TriggerClientEvent('vms_flightschoolv2:cl:getLicenses', target, license)
                        TriggerClientEvent('vms_boatschoolv2:cl:getLicenses', target, license)
                    end)
                end)
                --# End of modifications
            end
        else
            xPlayer.showNotification('Your job is not allowed to remove the license', 'error', 3000)
        end
    end
end)
```

</details>


---

# 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://docs.vames-store.com/assets/vms_boatschoolv2/common-errors.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.
