boro Posted November 15, 2014 Share Posted November 15, 2014 Wat is bad please help [19:36:04] WARNING: login/login_serv.lua:11: Bad argument @ 'setAccountData' [Expected account at argument 1, got boolean] [19:36:04] WARNING: login/login_serv.lua:12: Bad argument @ 'logIn' [Expected account at argument 2, got boolean] function on4XRegister ( player, user, pass, email ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end else account = addAccount ( user, pass ) setAccountData ( account, "email", email) if (logIn ( player, account, pass ) == true) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "Register/Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end end end addEvent( "on4XRegister", true ) addEventHandler( "on4XRegister", getRootElement(), on4XRegister ) Link to comment
WASSIm. Posted November 15, 2014 Share Posted November 15, 2014 tell us what chat put function on4XRegister ( player, user, pass, email ) local account = getAccount ( user, pass ) if ( account ) then if (logIn ( player, account, pass )) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end else local account = addAccount ( user, pass ) if ( account ) then if ( email ) and ( setAccountData ( account, "email", email)) then setAccountData ( account, "email", email) if (logIn ( player, account, pass )) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end else outputChatBox ( "Email error!", player, 255, 255, 0 ) -- Output they got the details wrong. end else outputChatBox ( "Register error!", player, 255, 255, 0 ) -- Output they got the details wrong. end end end addEvent( "on4XRegister", true ) addEventHandler( "on4XRegister", getRootElement(), on4XRegister ) 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