Jump to content

Warning


boro

Recommended Posts

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

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

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...