How to resolve this problem please ?
You should read the error message
Hey @CelineDumont89,
try to add the following line of code in to the fxmanifest.lua
of your qs-smartphone
resource.
shared_script '@es_extended/imports.lua'
Now all you have to do is read through the scripts and remove code like this:
ESX = nil
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
end)
or this:
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
If you did the steps right, it should resolve the problem.
If you would do this, the script wont work right? what will trigger the getSharedObject?
Hey @Knoz9,
the getSharedObject is EOL/Deprecated. It was replaced with an Export/Import method.
Export​
The Export can be simply used by doing:
ESX = exports["es_extended"]:getSharedObject()
Import​
The import can be used by simply adding this into the fxmanifest.lua
:
shared_script '@es_extended/imports.lua'
More information about esx:getSahredObject
Deprecation can you find here: esx:getSharedObject Deprecation | ESX Documentation
hi, ive got the same problem but i already did these steps on my whole server.
how can i fix it
Read the docs, thats why it tells you to. if you cannot understand “Remove these lines of code” and “add this line of code”, you should go learn basic programming and stop making a fivem server until u can.
just what I was looking for…
Excellent
Same…
same still
you still have ESX = nil on top of the script, if the script is escrowed reach out to the creator
just a quick question this new export Code
ESX = exports["es_extended"]:getSharedObject()
“es_extended” . is the database name or a code i should keep it the same ?
Is the name of the resource where the export come from
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.