Hello, I've found vG's Sapphire Script and when I launch server.exe, it said (at the end):
[2012-05-19 12:57:39] ERROR: mysql\connection.lua:13: attempt to call global 'mysql_connect' (a nil value)
[2012-05-19 12:57:55] ERROR: attempt to call a nil value
[2012-05-19 12:57:55] ERROR: call: failed to call 'mysql:query_fetch_assoc' [string "?"]
Some lines of my connection.lua:
-- connection settings
local hostname = "**HOST**"
local username = "** USR **"
local password = "**PASS**"
local database = "**DB**"
local port = 3306
-- global things.
local MySQLConnection = nil
local resultPool = { }
local sqllog = false
local countqueries = 0
-- connectToDatabase - Internal function, to spawn a DB connection
function connectToDatabase(res)
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
Question
Nicolasdes
Hello, I've found vG's Sapphire Script and when I launch server.exe, it said (at the end):
Some lines of my connection.lua:
-- connection settings local hostname = "**HOST**" local username = "** USR **" local password = "**PASS**" local database = "**DB**" local port = 3306 -- global things. local MySQLConnection = nil local resultPool = { } local sqllog = false local countqueries = 0 -- connectToDatabase - Internal function, to spawn a DB connection function connectToDatabase(res) 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 endSQL works with another gamemodes.
Link to comment
30 answers to this question
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