MartinDaBEST Posted November 10, 2015 Share Posted November 10, 2015 Hello Dear MTA Community, i have a Two questions (Whats problem with this 2 scripts) This are RPG scripts so its much harder (housing) local houses = executeSQLQuery("SELECT" FROM "'housingdata'") I Think there are two problems... SCRIPT ERROR: SATGhousing\housing_server.lua:2: ')' expected near 'FROM' ERROR: Loading script failed SATGhousing\housing_server.lua:2: ')' expected near 'FROM' (database) mysqlHandler = mysql_connect(host, username, password, database, port, socket, flags) ERROR: SATGdatabase\database.lua:16: attempt to call global 'mysql_connect' (a nil value) Thats it, Thank you, and I'm searching for a scripter if is someone interested I'll make other topic and post an link there Be Ready (Server SATG:RPG is coming up ) San Andreas Traditional Gaming ! Link to comment
GTX Posted November 10, 2015 Share Posted November 10, 2015 It is simple: local houses = executeSQLQuery("SELECT * FROM `housingdata`") If this is your full script, don't expect it to magically work For the database, you will need a module. https://wiki.multitheftauto.com/wiki/Modules/MTA-MySQL Put it in /mods/deathmatch/modules and then use loadmodule if your server is started. Otherwise put it in mtaserver.conf to load it every time you start the server. Everything is explained on wiki. Good luck. Link to comment
MartinDaBEST Posted November 10, 2015 Author Share Posted November 10, 2015 Thats not the full script ofc not there is just a problem hehe thank you. Link to comment
MartinDaBEST Posted November 11, 2015 Author Share Posted November 11, 2015 It is simple: local houses = executeSQLQuery("SELECT * FROM `housingdata`") If this is your full script, don't expect it to magically work For the database, you will need a module. https://wiki.multitheftauto.com/wiki/Modules/MTA-MySQL Put it in /mods/deathmatch/modules and then use loadmodule if your server is started. Otherwise put it in mtaserver.conf to load it every time you start the server. Everything is explained on wiki. Good luck. I Really don't know where to download that Module can someone help me please, Thanks. Link to comment
jingzhi Posted November 18, 2015 Share Posted November 18, 2015 It is simple: local houses = executeSQLQuery("SELECT * FROM `housingdata`") If this is your full script, don't expect it to magically work For the database, you will need a module. https://wiki.multitheftauto.com/wiki/Modules/MTA-MySQL Put it in /mods/deathmatch/modules and then use loadmodule if your server is started. Otherwise put it in mtaserver.conf to load it every time you start the server. Everything is explained on wiki. Good luck. I Really don't know where to download that Module can someone help me please, Thanks. No one is using the mysql module nowadays..... just stick to the db functions, show more scripts so we can help you 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