Hey.. today I tried to start my server, but I get some errors about MySQL:
ERROR: mysql\connection.lua:16: attempt to cal global 'mysql_connect'
Don't really know what this erros is on about, the database is running fine and the database info are where they need to be in the script...
-- global things.
local MySQLConnection = nil
local resultPool = { }
local sqllog = false
local countqueries = 0
-- connectToDatabase - Internal function, to spawn a DB connection
function connectToDatabase(res)
--[[Line 16 >> ]] MySQLConnection = mysql_connect(hostname, username, password, database, port)
if (not MySQLConnection) then
if (res == getThisResource()) then
cancelEvent(true, "Cannot connect to the database.")
end
return nil
end
return nil
end
addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), connectToDatabase, false)