Jump to content

help [Gui]


sckatchof

Recommended Posts

Posted
Could you post the warnings/errors you got?

when i press button to change password i have warnig at lien 12

function passwordHandler(player, oldpassword, newpassword) 
    local account = getPlayerAccount(player) 
    if (account) then 
        if (isGuestAccount(account)) then 
            outputChatBox("You must be logged in to change your password.", player) 
            return 
        end 
        local accountName = getAccountName ( account ) 
        local password_check = getAccount(accountName, oldpassword) 
        if (password_check ~= false) then 
            if (string.len(newpassword) >= 5) then 
                setAccountPassword(account, newpassword) 
                triggerClientEvent(player, "hidePasswordWindow", getRootElement()) 
            else 
                outputChatBox("Your new password must be at least 5 characters long!", player) 
            end 
        else 
            outputChatBox("Old password invalid.", player) 
        end 
    end 
end 
addEvent("submitChangepw", true) 
addEventHandler("submitChangepw", root, passwordHandler) 

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