Update:
I seem to have gotten the first error to go away but now I have a new one…
i keep getting attempt to concentate nil value errors now when i try to actually call the export
SCRIPT ERROR: @911_legacy/sv_911.lua:36: attempt to concatenate a function value (local ‘postal’)
Original Post:
I’m working with nearest-postal script attempting to export the postal to my chat for 911 purposes.
([Release] Nearest Postal Script)
In nearest-postal resource cl.lua they have
exports('getPostal', function() return nearest and nearest.code or nil end)
–
My local code:
local postal = exports["nearest-postal"]:getPostal()
–
But yet I get errors for:
No such export getPostal in resource nearest-postal
–
I tried adding the exports to the fxmanifest of nearest-postal resource and the dependency to fxmanifest of the 911 script I am using such as:
from nearest-postal fxmanifest
exports {
"getPostal"
}
server_exports {
"getPostal"
}
and from my dependent resource fxmanifest:
dependency "nearest-postal"
Sigh.
Any ideas for why the resource keeps saying there is no export? (the nearest-postal resource is starting above the dependent resource in server.cfg as well)
Thanks all.