gertyn Posted June 29, 2012 Share Posted June 29, 2012 Witam, mam problem zpolaczeniem z baza mysql. Moj skrypt local hostname = get( "hostname" ) or "SQL09.FREEMYSQL.NET" local username = get( "username" ) or "nazwa usera" local password = get( "password" ) or "haslo" local database = get( "database" ) or "nazwa bazy" local port = tonumber( get( "port" ) ) or 3306 function connectToDatabase(res) 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) po uruchomieniu skrypt pokazuje blad ERROR: \mysql\connect.lua:12: attempt to call global 'mysql_connect' (a nil value) Link to comment
-ffs-Sniper Posted June 29, 2012 Share Posted June 29, 2012 Wygląda na to że moduł MTA MySQL nie został uruchomiony prawidłowo. (https://wiki.multitheftauto.com/wiki/Mysql) 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