Jump to content

[HELP] Problem with 2 Scripts help me please


MartinDaBEST

Recommended Posts

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

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
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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...