Thorsten Posted November 25, 2012 Share Posted November 25, 2012 Hey Guys, i have a Problem with MySQL Testmode/script.lua:105: attempt to call global 'mysql_query' (a nil value)Testmode/deathmatch/dmweapons.lua:15: attempt to call global 'MySQL_GetString' (a nil value) Testmode/deathmatch/gweapons1/g1_settings.lua:5: attempt to call global 'MySQL_GetString' (a nil value) Testmode/deathmatch/gweapons2/g2_settings.lua:5: attempt to call global 'MySQL_GetString' (a nil value) Testmode/deathmatch/gweapons3/g3_settings.lua:5: attempt to call global 'MySQL_GetString' (a nil value) Testmode/pm/pm_server.lua:3: attempt to call global 'mysql_query' (a nil value) Testmode/deathmatch/areas.lua:52: attempt to call global 'MySQL_GetString' (a nil value) here my ACL <group name="Admin"> <acl name="Admin"></acl> <object name="resource.Testmode"></object> here my mtaserver.conf <module src="mta_mysql" /> the module is in the MTA_Server_1260/mods/deathmatch/modules/ in the meta file is the MySQL connect data, the first wich loads. from the MySQL connect: gMysqlHost = "localhost" gMysqlUser = "********" gMysqlPass = "********" gMysqlDatabase = "MTA" function MySQL_Startup() handler = mysql_connect(gMysqlHost, gMysqlUser, gMysqlPass, gMysqlDatabase) if( not handler) then outputDebugString("Couldn't run query: Unable to connect to the MySQL server!") outputDebugString("Please shutdown the server and start the MySQL server!") end end i tried copy the User and the Pass and connect over phpmyadmin and it works. Even the MySQL connect data doesnt send a error message. i hope you can help. sorry for bad english, im from germany Link to comment
uhm Posted November 25, 2012 Share Posted November 25, 2012 I think you're supposed to do this in mtaserver.conf: <module src="mta_mysql.dll" /> <!-- or .so for linux --> https://wiki.multitheftauto.com/wiki/Mod ... stallation Though the error "attempt to call global 'MySQL_GetString' (a nil value)" is pretty strange, since that's not a documented function on MTA-MySQL wiki page. It would be a custom function so why doesn't it exist? Link to comment
Thorsten Posted November 25, 2012 Author Share Posted November 25, 2012 it is in the mtaserver.conf its loadet and the connect script doesnt send an error. Thats the Problem. Link to comment
uhm Posted November 25, 2012 Share Posted November 25, 2012 Ok, if it says in console that it's loaded then it's alright. Because your post says mta_mysql without .dll or .so Link to comment
AhmadQTR Posted November 25, 2012 Share Posted November 25, 2012 Maybe you didn't made the file 'modules' without the ' ' and be sure you named it modules Link to comment
Thorsten Posted November 25, 2012 Author Share Posted November 25, 2012 a file? check my pic. http://www10.pic-upload.de/25.11.12/ja5k4m1dn61d.png Link to comment
AhmadQTR Posted November 25, 2012 Share Posted November 25, 2012 a file?check my pic. http://www10.pic-upload.de/25.11.12/ja5k4m1dn61d.png Your module is .so , then you must type in mtaserver.conf <module src="mta_mysql.so" /> Link to comment
Thorsten Posted November 25, 2012 Author Share Posted November 25, 2012 (edited) i have... ill send pic... http://www7.pic-upload.de/25.11.12/ush786n9g7y9.png Edited November 25, 2012 by Guest Link to comment
AhmadQTR Posted November 25, 2012 Share Posted November 25, 2012 Well i don't know MySQL , this may help you https://forum.multitheftauto.com/viewtopic.php?f=148&t=42067 Link to comment
Anderl Posted November 25, 2012 Share Posted November 25, 2012 Use mysql_error to get more details about the error. Link to comment
Thorsten Posted November 25, 2012 Author Share Posted November 25, 2012 in which file to write the command? // i take short shower, the i try the tut from the link and then i see. // back soon, hope one of the tipps will work. Link to comment
AhmadQTR Posted November 25, 2012 Share Posted November 25, 2012 Hey Guys,i have a Problem with MySQL Testmode/script.lua:105: attempt to call global 'mysql_query' (a nil value)Testmode/deathmatch/dmweapons.lua:15: attempt to call global 'MySQL_GetString' (a nil value) Testmode/deathmatch/gweapons1/g1_settings.lua:5: attempt to call global 'MySQL_GetString' (a nil value) Testmode/deathmatch/gweapons2/g2_settings.lua:5: attempt to call global 'MySQL_GetString' (a nil value) Testmode/deathmatch/gweapons3/g3_settings.lua:5: attempt to call global 'MySQL_GetString' (a nil value) Testmode/pm/pm_server.lua:3: attempt to call global 'mysql_query' (a nil value) Testmode/deathmatch/areas.lua:52: attempt to call global 'MySQL_GetString' (a nil value) in the meta file is the MySQL connect data, the first wich loads. from the MySQL connect: gMysqlHost = "localhost" gMysqlUser = "********" gMysqlPass = "********" gMysqlDatabase = "MTA" function MySQL_Startup() handler = mysql_connect(gMysqlHost, gMysqlUser, gMysqlPass, gMysqlDatabase) if( not handler) then outputDebugString("Couldn't run query: Unable to connect to the MySQL server!") outputDebugString("Please shutdown the server and start the MySQL server!") end end Well , see the errors and see this ^ It types errors that you didn't use , so show the full script so we can see -.- Link to comment
Anderl Posted November 25, 2012 Share Posted November 25, 2012 in which file to write the command?// i take short shower, the i try the tut from the link and then i see. // back soon, hope one of the tipps will work. Where do you think? 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