No such export <name> in resource <resource>
One script tried to use a feature of another script that is not there — usually because that other script is off, or is a different version.
Do this first
Check the script it names is actually running, and that both are versions meant for each other.
What it means
Code called an export that the target resource does not expose, either because it never did or because it is not running so nothing is registered.
What causes it
Ordered by how often it is the answer.
- 1
The resource is stopped
Exports exist only while the resource is started. A stopped resource has none.
- 2
The export name is wrong
Case sensitive.
exports.ox_inventory:search()is notSearch(). - 3
The export is on the other side
A client export called from the server, or the reverse.
- 4
The installed version does not have it
Exports get added and renamed between releases. Very common with inventories.
- 5
It is called before the resource started
Ordering again, this time at runtime rather than load time.
How to tell which one is yours
print(GetResourceState('ox_inventory'))started means the resource is up and the name is wrong. Anything else is ordering or a missing resource. Then find the real names:
grep -rn "exports(" ox_inventory/Where to look
The exporting resource's own files, for the exact exports('name', fn) line.
How to fix it
if GetResourceState('ox_inventory') ~= 'started' then
return
end
local ok, result = pcall(function()
return exports.ox_inventory:Search(src, 'count', 'water')
end)
if not ok then return endStill stuck on your own code?
This page is what this error usually means. Paste your console into Server Fixer and it will rank everything in it and tell you what to do first, and if you would rather not touch it, ORBIE can repair the script and hand the resource back ready to drop in.
bug_reportOpen Server Fixer