Mam problem z połączeniem się z baza.
Logi:
[AMXX] Loaded 1 admin from file
L 01/14/2014 - 20:20:45: [AMXX] Plugin ("xpmod-engine.amxx") is setting itself as failed.
L 01/14/2014 - 20:20:45: [AMXX] Plugin says: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
L 01/14/2014 - 20:20:45: [AMXX] Displaying debug trace (plugin "xpmod-engine.amxx")
L 01/14/2014 - 20:20:45: [AMXX] Run time error 1: forced exit
L 01/14/2014 - 20:20:45: [AMXX] [0] xpmod-engine.sma::plugin_init (line 37)
linia bledu:
sql_connect = SQL_Connect(sql_tuple,sql_error_code,sql_error,charsmax(sql_error));
no i oczywiście niby błędny kod:
sql_tuple = SQL_MakeDbTuple(sql_host,sql_user,sql_pass,sql_name);
sql_connect = SQL_Connect(sql_tuple,sql_error_code,sql_error,charsmax(sql_error));
if(sql_connect == Empty_Handle) {
set_fail_state(sql_error);
} else {
log_amx("[XP- Mod - SQL] Polaczenie z baza danych nawiazane!");
}
new sql_user_table[1024];
formatex(sql_user_table, charsmax(sql_user_table), "CREATE TABLE IF NOT EXISTS `xpmod_user` (`user_name` VARCHAR(64), `user_authorization` VARCHAR(64), `user_xp` INT(9), `user_coins` INT(9), `user_level` INT(9))");
new Handle:sql_create = SQL_PrepareQuery(sql_connect, sql_user_table);
if(!SQL_Execute(sql_create)) {
SQL_QueryError(sql_create, sql_error, charsmax(sql_error));
set_fail_state(sql_error);
} else {
SQL_FreeHandle(sql_create);
}
SQL_FreeHandle(sql_connect);
Użytkownik RyD3r edytował ten post 14.01.2014 20:51


Dodatki SourceMod



Temat jest zamknięty









