PashaBiceps Posted April 4, 2019 Posted April 4, 2019 (edited) 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 April 4, 2019 by GodKraken
Moderators IIYAMA Posted April 5, 2019 Moderators Posted April 5, 2019 @GodKraken Your database must have failed to load. That uncludes more warnings that you have forgot to mention. Make sure to unzip the resource before using it. 1
PashaBiceps Posted April 5, 2019 Author Posted April 5, 2019 6 minutes ago, IIYAMA said: @GodKraken Your database must have failed to load. That uncludes more warnings that you have forgot to mention. Make sure to unzip the resource before using it. Its zipped, thanks a loot 1
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