I started scripting a fresh new TDM script from 0 and I wanted to try out the bcyrpt hashing alg and everything went fine I created a register/login system but when I wanted to test it next things happend:
myScript:
The errors I get in mysql
EDIT: I use R41-4 and this happens after OnGameModeInit, and my connection is successful
myScript:
Code:
public OnPlayerConnect(playerid) {
new query[256];
mysql_format(SQL, query, sizeof query, "SELECT * FROM `players` WHERE `name`='%e' LIMIT 1", GetPlayerNameEx(playerid)); // 9
mysql_pquery(SQL, query, "OnAccountCheck", "i", playerid); // 10
#if defined reg_OnPlayerConnect
return reg_OnPlayerConnect(playerid);
#else
return true;
#endif
}
#if defined _ALS_OnPlayerConnect
#undef OnPlayerConnect
#else
#define _ALS_OnPlayerConnect
#endif
#define OnPlayerConnect reg_OnPlayerConnect
#if defined reg_OnPlayerConnect
forward reg_OnPlayerConnect(playerid);
#endif
The errors I get in mysql
Code:
[INFO] changed log level from 'warning, error' to 'debug, info, warning, error'
[DEBUG] CThreadedConnection::WorkerFunc(this=0x41ea020, connection=0x41ea020)
[DEBUG] mysql_format(111, 0x0307AF98, 256, "SELECT * FROM `players` WHERE `name` = '%e'") (modules/register.pwn:10)
[ERROR] mysql_format: invalid connection handle '111' (modules/register.pwn:10)
[DEBUG] mysql_pquery(111, "", "OnAccountCheck", "i") (modules/register.pwn:11)
[ERROR] mysql_pquery: invalid connection handle '111' (modules/register.pwn:11)
[DEBUG] mysql_pquery: return value: '0' (modules/register.pwn:11)
EDIT: I use R41-4 and this happens after OnGameModeInit, and my connection is successful