novo Posted January 16, 2013 Posted January 16, 2013 Hello, I'm having troubles with triggering client events from server-side. (Client event not found) Server: triggerEvent("loadDepend", source, arena, pickups) --# Global Server addEvent("loadDepend", true) addEventHandler("loadDepend", root, function(arena, pickups) outputChatBox("TRYING TO LOAD DEPENDENCES") triggerClientEvent(source, "loadPickups", root, pickups) end) Client: function loadPickups(pickups) outputChatBox("PICKUPS RECIEVED") end addEvent("loadPickups", true) addEventHandler("loadPickups", root, loadPickups) Thanks in advance.
csiguusz Posted January 16, 2013 Posted January 16, 2013 It's working for me. Did you add your client script file to your meta.xml?
novo Posted January 16, 2013 Author Posted January 16, 2013 Yes I did, let me try on a separated resource.. I'll edit this reply with the result. EDIT: It's working fine on a separated resource.. I'm gonna try to find a solution, thank you anyway.
myonlake Posted January 16, 2013 Posted January 16, 2013 I have had issues with events before and the only thing that worked for me was to create a new Lua file and put the contents of the old one in the new one. I think you have accidentally switched the compilation to something else, which doesn't understand what you're doing.
Anderl Posted January 16, 2013 Posted January 16, 2013 Or client file is loading after the server file and that way it won't find any event.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now