I’m trying to trigger a server event in the same file on startup.
server.lua
print("*****RESOURCE HAS STARTED")
TriggerEvent("funcReturn", "a")
AddEventHandler("funcReturn", function(var1)
print("triggered")
print(var1)
end)
print("*****RESOURCE IS RUNNING")
^ Returns
*****RESOURCE HAS STARTED
*****RESOURCE IS RUNNING
If you look at the event itself, it’s not being fired with the other print statements. I’ve spent about an hour trying to fix this, checking docs etc to make sure I haven’t made a stupid mistake.
Anyone got any ideas?