qherox12 Posted September 25, 2022 Share Posted September 25, 2022 I am facing such error Expected db-connection at argument 2, got boolean in my MTA Server console. What should I do? Link to comment
βurak Posted September 25, 2022 Share Posted September 25, 2022 (edited) can you show the code? Edited September 25, 2022 by Burak5312 1 Link to comment
qherox12 Posted September 25, 2022 Author Share Posted September 25, 2022 2 dakika önce Burak5312 dedi ki: kodu gösterebilir misin? https://www.hizliresim.com/j239y35 Link to comment
Shady1 Posted September 25, 2022 Share Posted September 25, 2022 2 minutes ago, qherox12 said: https://www.hizliresim.com/j239y35 want to see your codes Link to comment
qherox12 Posted September 25, 2022 Author Share Posted September 25, 2022 1 minute ago, Shady1 said: kodlarını görmek istiyorum Error codes? Link to comment
Shady1 Posted September 25, 2022 Share Posted September 25, 2022 (edited) 2 minutes ago, qherox12 said: Error codes? yes,you have to show your faulty codes and lines so we can help you Edited September 25, 2022 by Shady1 Link to comment
qherox12 Posted September 25, 2022 Author Share Posted September 25, 2022 function loadAllElevators(res) triggerClientEvent("interior:clearElevators", getRootElement()) dbQuery( function(qh) local res, rows = dbPoll(qh, 0) if rows > 0 then for index, row in ipairs(res) do loadOneElevator(row.id) end end end, mysql:getConnection(), "SELECT id FROM elevators") end setTimer(loadAllElevators,timerLoadAllElevators, 1) Link to comment
βurak Posted September 25, 2022 Share Posted September 25, 2022 Is the getConnection function coming from a separate resource?, are you using mysql or sqlite?, if possible, can you show the codes of the getConnection function? and have you tried using exports? 1 Link to comment
qherox12 Posted September 25, 2022 Author Share Posted September 25, 2022 2 hours ago, Burak5312 said: getConnection işlevi ayrı bir kaynaktan mı geliyor?, mysql mi yoksa sqlite mi kullanıyorsunuz?, mümkünse getConnection işlevinin kodlarını gösterebilir misiniz? ve dışa aktarmayı kullanmayı denediniz mi? i am using mysql Link to comment
AngelAlpha Posted September 25, 2022 Share Posted September 25, 2022 3 hours ago, qherox12 said: i am using mysql dbConnection return nil, check data conection to mysql Link to comment
qherox12 Posted September 26, 2022 Author Share Posted September 26, 2022 15 hours ago, AngelAlpha said: dbConnection nil dönüşü, mysql ile veri bağlantısını kontrol edin I downloaded a ready script and set up a database. I have it connected but it doesn't seem to be connected. Or did I not connect? Link to comment
AngelAlpha Posted September 29, 2022 Share Posted September 29, 2022 On 26/09/2022 at 15:52, qherox12 said: I downloaded a ready script and set up a database. I have it connected but it doesn't seem to be connected. Or did I not connect? Maybe you not connect 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