Jump to content

Login Handler


Norhy

Recommended Posts

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?

Link to comment
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 by Guest
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...