Jump to content

Expected db-connection at argument 2 Error


Tnnrmn

Recommended Posts

Posted (edited)

sb246pu.png
fs8jn5n.png

2 minutes ago, qherox12 said:

Error codes?

yes,you have to show your faulty codes and lines so we can help you

Edited by Shady1
Posted
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)

 

Posted

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?

  • Like 1
Posted
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

Posted
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?

Posted
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

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