Norhy Posted August 2, 2013 Posted August 2, 2013 Hello guys. I'm making a Login panel, but somehow i cannot log-in. I tried using an another panel and it worked with the same code. local account = getAccount ( username, password ) if ( account ~= false ) then Error: bad argument at getAccount expected string at argument 1, got boolean. I don't see any mistake there, do you?
golanu21 Posted August 2, 2013 Posted August 2, 2013 "username" is not defined "password" is not defined make it like this getAccount(getPlayerName(source))
Norhy Posted August 2, 2013 Author Posted August 2, 2013 Both are defined, also, i tried that method before but it doesn't work.
Norhy Posted August 2, 2013 Author Posted August 2, 2013 (edited) addEvent( "submitLogin", true) function loginHandler(username,password) local account = getAccount ( username, password ) if ( account ~= false ) then logIn(source, account, password) triggerClientEvent(source,"HideGui",source) else outputChatBox("Zle zadane Meno alebo Heslo, skus znova prosim.",source) end end addEventHandler("submitLogin",root,loginHandler) And then i have the registerHandler, but that is working fine, just need help with the login. Edited August 2, 2013 by Guest
xXMADEXx Posted August 2, 2013 Posted August 2, 2013 How did you trigger it from the client side? because, the error is saying that username isn't defined.
Norhy Posted August 2, 2013 Author Posted August 2, 2013 triggerServerEvent('submitLogin',localPlayer,username,password)
xXMADEXx Posted August 2, 2013 Posted August 2, 2013 for username and password your using guiGetText correct? If so then use "outputChatBox ( username.." "..password )" on the server side.
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