---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3.7-R2, ©2005-2015 SA-MP Team [19:10:47] filterscripts = "" (string) [19:10:47] [19:10:47] Server Plugins [19:10:47] -------------- [19:10:47] Loading plugin: mysql.dll [19:10:47] >> plugin.mysql: R41-4 successfully loaded. [19:10:47] Loaded. [19:10:47] Loading plugin: nativechecker.dll [19:10:47] Loaded. [19:10:47] Loading plugin: streamer.dll [19:10:47] *** Streamer Plugin v2.9.2 by Incognito loaded *** [19:10:47] Loaded. [19:10:47] Loading plugin: Whirlpool.dll [19:10:47] [19:10:47] ================== [19:10:47] [19:10:47] Whirlpool loaded [19:10:47] [19:10:47] ================== [19:10:47] [19:10:47] Loaded. [19:10:47] Loaded 4 plugins. [19:10:47] [19:10:47] Filterscripts [19:10:47] --------------- [19:10:47] Loaded 0 filterscripts. [19:10:48] AMX (23667336) loaded [19:10:48] [MYSQL] - NOTICE: Successfully connected to database! [19:10:48] ---------------------------------- [19:10:48] Test server [19:10:48] ---------------------------------- [19:10:48] Number of vehicle models: 0 |
Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3.7-R2, ©2005-2015 SA-MP Team [15:52:11] filterscripts = "" (string) [15:52:11] [15:52:11] Server Plugins [15:52:11] -------------- [15:52:11] Loading plugin: mysql.dll [15:52:11] >> plugin.mysql: R41-4 successfully loaded. [15:52:11] Loaded. [15:52:11] Loading plugin: sscanf.dll [15:52:11] [15:52:11] =============================== [15:52:11] sscanf plugin loaded. [15:52:11] Version: 2.8.2 [15:52:11] © 2012 Alex "******" Cole [15:52:11] =============================== [15:52:11] Loaded. [15:52:11] Loading plugin: streamer.dll [15:52:11] *** Streamer Plugin v2.9.2 by Incognito loaded *** [15:52:11] Loaded. [15:52:11] Loading plugin: Whirlpool.dll [15:52:11] [15:52:11] ================== [15:52:11] [15:52:11] Whirlpool loaded [15:52:11] [15:52:11] ================== [15:52:11] [15:52:11] Loaded. [15:52:11] Loading plugin: nativechecker.dll [15:52:11] Loaded. [15:52:11] Loaded 5 plugins. [15:52:11] [15:52:11] Filterscripts [15:52:11] --------------- [15:52:11] Loaded 0 filterscripts. [15:52:11] AMX (19866176) loaded [15:52:11] ---------------------------------- [15:52:11] Test server [15:52:11] ---------------------------------- [15:52:11] Number of vehicle models: 0 |
ConnectSQLDatabase() { new MySQLOpt:options_id = mysql_init_options(); mysql_set_option(options_id, AUTO_RECONNECT, false); SQL_HANDLE = mysql_connect(SQL_HOSTNAME, SQL_USERNAME, SQL_PASSWORD, SQL_DATABASE, options_id); if(mysql_errno(SQL_HANDLE) != 0 || SQL_HANDLE == MYSQL_INVALID_HANDLE) { print("\n----------------------------------------------------"); print("[ERROR] Cannot establish connection to MySQL database!"); printf("[MYSQL] ERROR CODE: %d", mysql_errno(SQL_HANDLE)); print("----------------------------------------------------"); } else { print("[MYSQL] Connection to MySQL database established successfully!"); } return 1; }
#define SQL_Warning(%0) (printf("[MYSQL] - WARNING: " %0)) #define SQL_Error(%0) (printf("[MYSQL] - ERROR: " %0)) #define SQL_Notice(%0) (printf("[MYSQL] - NOTICE: " %0))
#define mysql_host "localhost" #define mysql_user "test1" #define mysql_db "release" #define mysql_pass "test123" #define mysql_debugging_enabled (true) #define SQL_PLAYERS_TABLE "Users"
SQL::Connect(mysql_host, mysql_user, mysql_pass, mysql_db);
Unfortunetly no I have no idea why it's doing this as it worked fine a couple of days ago...
|
OnGameModeInit() { SQL::Connect(mysql_host, mysql_user, mysql_pass, mysql_db); // Other code below }