Dimos7 Posted March 26, 2018 Share Posted March 26, 2018 (edited) function db_connect() connection = dbConnect("sqlite", ":/global.db") dbExec(connection, "CREATE TABLE IF NOT EXISTS vehicles(id int(11) , model int(3) DEFAULT '0',x decimal(10,6) DEFAULT '0.000000', y demical(10,6) DEFAULT '0.000000' , z demical(10,6) DEFAULT '0.000000', rotx demical(10,6) DEFAULT '0.000000', roty demical(10,6) DEFAULT '0.000000', rotz demical(10,6) DEFAULT '0.000000')") end addEventHandler("onResourceStart", resourceRoot, db_connect) function db_query(callbackFunction, str) return dbQuery(callbackFunction, connection, str) end function db_exec(str) return dbExec(connection, str) end dbQuery expect db-connection argument 1 got nil Edited March 26, 2018 by Dimos7 Link to comment
MIKI785 Posted March 27, 2018 Share Posted March 27, 2018 That path is invalid, see here: https://wiki.multitheftauto.com/wiki/Filepath 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