Snoozy Posted January 6, 2011 Share Posted January 6, 2011 I keep getting the warning/error ERROR: Client triggered serverside event accLog, but event is not added serverside I once didn't have this problem but then I coded a bit here and there got ingame to try my script and wupti it didn't work and now I can't find the problem anymore and like I've looked through all code 3 times now with no luck. Starting Server Event:(CLIENT) function clientSubmitLogin(button,state) if button == "left" and state == "up" then local username = guiGetText(edtUser) local password = guiGetText(edtPass) if username and password then triggerServerEvent("accLog",getLocalPlayer(),username,password) else outputChatBox("Please enter a username and/or password.") end end end Server code: function loginHandler(username,password) -- Mysql Stuff as well as setElementData stuff and getElementData end addEvent("accLog",true) addEventHandler("accLog",getRootElement(),loginHandler) Please tell me if the problem could be in loginHandler I will put that code in if required. Thank you. Link to comment
Kenix Posted January 6, 2011 Share Posted January 6, 2011 I keep getting the warning/error ERROR: Client triggered serverside event accLog, but event is not added serverside I once didn't have this problem but then I coded a bit here and there got ingame to try my script and wupti it didn't work and now I can't find the problem anymore and like I've looked through all code 3 times now with no luck. Starting Server Event:(CLIENT) function clientSubmitLogin(button,state) if button == "left" and state == "up" then local username = guiGetText(edtUser) local password = guiGetText(edtPass) if username and password then triggerServerEvent("accLog",getLocalPlayer(),username,password) else outputChatBox("Please enter a username and/or password.") end end end Server code: function loginHandler(username,password) -- Mysql Stuff as well as setElementData stuff and getElementData end addEvent("accLog",true) addEventHandler("accLog",getRootElement(),loginHandler) Please tell me if the problem could be in loginHandler I will put that code in if required. Thank you. try this triggerServerEvent("accLog",getLocalPlayer(),getLocalPlayer(),username,password) Link to comment
Snoozy Posted January 6, 2011 Author Share Posted January 6, 2011 Found solution to it Link to comment
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