No such export setAutoSpawnCallback

It seems as if spawnmanager offered to set a custom spawn callback instead of its default one, via an exported function setAutoSpawnCallback. However, every time I try to call the function like exports.spawnmanager:setAutoSpawnCallback(spawnPlayer), where spawnPlayer is my custom callback, it cannot find the function:

“No such export setAutoSpawnCallback in resource spawnmanager”

This happens no matter whether called directly in the script, or in onClientResourceStart when waiting for spawnmanager to start.
How could a custom spawn callback be set?

Edit: Although I pass a valid callback to setAutoSpawnCallback, it get’s passed as nil. I suppose exports are still bugged. Wished debugging this was a bit more easier than having to go through 5 client crashes before I even get to the spawn routine and then having to restart the game because there is no disconnect option when the player isn’t spawned.

Confirm, export seems buggy.

FXServer, latest cfx-server-data without changes.

People cannot join to my server frequently because of error in fivem_client.lua:2 in line:


exports.spawnmanager:setAutoSpawn(true)

Client log error:
[ 73641] Error running system event handling function for resource fivem: citizen:/scripting/lua/scheduler.lua:39: Failed to execute thread: citizen:/scripting/lua/scheduler.lua:394: No such export setAutoSpawn in resource spawnmanager

It works for me.
I have that in the __resource file from spawnmanager :

And the function exist :

I don’t know for you

It happens sometimes and especially for first connections.
Next one is 99.99% success.

And you talked about different function - setAutoSpawnCallback.
As mentioned in log the problem is in setAutoSpawn in fivem_client.lua:2.

I got the both functions. The both are working actually