MisterQuestions Posted August 20, 2014 Share Posted August 20, 2014 Hey all....i got an error from this login... can you tell me whats wrong?? Client-Side addEventHandler ( "onClientClick", getRootElement(), function ( button, state, px, py ) if ( button == "left" and state == "down" ) then if ( px > x*0.382 and px < x*0.555 and py > y*0.719 and py < y*0.79 ) then if ( isLoginActive ) then playSound("Sounds/button1.mp3", false) local user = guiGetText( Login_User ) local pass = guiGetText( Login_Password ) if ( user ~= "" and pass ~= "" ) then triggerServerEvent("player:register", getRootElement(), getLocalPlayer(), user, pass) end Server-Side function server.register (thePlayer, Username, Password) if ( thePlayer ~= "" and Username ~= "" and Password ~= "" ) then addAccount( Username, Password ) triggerClientEvent( thePlayer, "player:loginNotification", getRootElement(), true ) triggerClientEvent( thePlayer, "server:note", getRootElement(), "success", "You successfully registered") return true else triggerClientEvent( thePlayer, "server:note", getRootElement(), "error", "Error on register") triggerClientEvent( thePlayer, "player:loginNotification", getRootElement(), false ) return false end end Link to comment
DNL291 Posted August 20, 2014 Share Posted August 20, 2014 It's missing ')' after end in the event: "onClientClick". Also, 'server' must be a table in the function server.register, since you're using a dot which will index a key from a table. 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