..:D&G:.. Posted August 31, 2013 Share Posted August 31, 2013 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) Link to comment
Castillo Posted August 31, 2013 Share Posted August 31, 2013 You must load the MySQL module. Link to comment
..:D&G:.. Posted August 31, 2013 Author Share Posted August 31, 2013 I did, but it keeps saying that it failed and that the resource was not found.. but I don't know what resource Link to comment
Castillo Posted August 31, 2013 Share Posted August 31, 2013 Maybe you did it wrong, have you added it to the mtaserver.conf and the module to "modules" folder? Link to comment
..:D&G:.. Posted August 31, 2013 Author Share Posted August 31, 2013 Sure, I just opened my server the day before, and today it didn't work, but I'll check again -------------EDITED------------ I fixed the problem, I think the module got deleted from the mtaserver when I used the mtasa script editor... 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