Jump to content

[Help] Login


Recommended Posts

Hi guys, i'm with an error. Is here some of my code, where error appear. I marked the line of the error!

On my localhost, my script works perfectly, but in the host gave me this error.

Thanks in Advance for any help ❤️ 

attempt to get length of local 'table' (a nil value)
local time = getRealTime()
				local days = tonumber(time.monthday) 
				local months = tonumber(time.month)
				local years = tonumber(time.year)
                local table = db:query("SELECT * FROM Royal WHERE Usuario=? LIMIT 1", user)
Error >>>>      if #table > 0 then
                    setElementData(source, "ID", table[1]["ID"]) 
                    db:query("UPDATE Royal SET Nick=?, Acesso=?, Serial=? WHERE Usuario=?", getPlayerName(source):gsub("#%x%x%x%x%x%x", ""), days.."/"..months+(1).."/"..years-(100), getPlayerSerial(source), user)
                    outputDebugString("Dados de usuário carregados!", 0, 145, 212, 17)
                    setTimer(setCameraTarget, 3000, 1, source, source)
                    setTimer(triggerClientEvent, 14000, 1, source, "renderQ", source)
                    triggerClientEvent(source, "onRoyalLogin", source)
                    outputLoginMsg(source, "Logado com sucesso! Aguarde...", "success")
                else
                    outputLoginMsg(source, "Dados desta conta não foram encontrados em nosso banco de dados.", "error")
                end

 

Edited by GodKraken
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...