Everything should be configured correctly, the resource im trying to pull an export from is called sl-needs so i cant seem to figure out why it wont call the event.
server_exports
won’t change an event handler to an export, you should have the event function be a named function instead of anonymous function
-- anonymous (no name)
function()
end
-- named function
function getAlcoholLevel()
end
Then you can do
exports("getAlcoholLevel", getAlcoholLevel)
Which will export the function
It should also be noted that source
is implicit in the js/lua runtimes, also calling TriggerClientEvent won’t return anything you need to handle RPCs yourself as there is no way built in to do s → c callbacks.
They’re both Server To Server.
Probably should had mentioned that my bad.
But i have tried using exports() too
It yields the same stubborn result with “No such export getAlcoholLevel”
Edit:
After experimenting a bit and keeping the NetEvent together with exports have resolved the issue
Thank you so much
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.