[HELP] Error on es:getPlayerFromId

Hi,

I got this error:

This is my code :

RegisterServerEvent("skin_customization:SaveSkin")
AddEventHandler("skin_customization:SaveSkin", function(skin)
    TriggerEvent('es:getPlayerFromId', source, function(user)
        local player = user.identifier
        local executed_query = MySQL:executeQuery("UPDATE outfits SET skin = '@skin' WHERE identifier = '@user'", {['@skin'] = skin, ['@user'] = user})
    end)
end)

Thanks for help
PS: This is not an error in a script, i have just create a function but it’s didn’t work :frowning:

Where is ‘user’ being set? Does it contain a number or a table or something?

Try setting the value of the user parameter in your query to player which you define as the user’s identifier.

change user by player in the request as Aussi and Briglair suggest