25.01.2017, 14:35
Hello, i have really strange problem. My MySQL connects two times, when i run samp server. Firstly, i thought its smth wrong in my code, so i created new one, where i wrote only mysql connect function and issue is still alive. For example, in my orginal script i have loading vehicles from database and it loads vehicles 2 times. Where is the problem? Here is clean mysql connect code, which i used.
MySQL include from BlueG(the newest one).
server log:
MySQL include from BlueG(the newest one).
Код:
#include <a_samp> #include <a_mysql> new MySQL:test_SQL; #define mysql_user "root" #define mysql_password "" #define mysql_host "localhost" #define mysql_db "test" main(); public OnGameModeInit() { test_SQL = mysql_connect(mysql_host, mysql_user, mysql_password, mysql_db); if (test_SQL == MYSQL_INVALID_HANDLE || mysql_errno(test_SQL) != 0) { print("Nope"); return 1; } else print("Connected"); return 1; } public OnGameModeExit() { mysql_close(test_SQL); return 1; }
Код:
SA-MP Dedicated Server ---------------------- v0.3.7-R2, ©2005-2015 SA-MP Team [16:21:57] filterscripts = "" (string) [16:21:57] [16:21:57] Server Plugins [16:21:57] -------------- [16:21:57] Loading plugin: mysql [16:21:57] >> plugin.mysql: R41-2 successfully loaded. [16:21:57] Loaded. [16:21:57] Loading plugin: crashdetect [16:21:57] CrashDetect v4.18 is OK. [16:21:57] Loaded. [16:21:57] Loaded 2 plugins. [16:21:57] [16:21:57] Filterscripts [16:21:57] --------------- [16:21:57] Loaded 0 filterscripts. [16:21:58] Connected [16:21:58] Connected [16:21:58] Number of vehicle models: 0