vovalutsk96
Компетентный
Я когда захожу на сервер у меня мод выключается ...
Вот лог
[10:49:46] >> mysql_connect(localhost, root, , ******) on port 3306
[10:49:46] CMySQLHandler::CMySQLHandler() - constructor called.
[10:49:46] CMySQLHandler::CMySQLHandler() - Connecting to "localhost" | DB: "" | Username: "root"
[10:49:46] CMySQLHandler::Connect() - Access denied for user 'root'@'localhost' (using password: YES) (Error ID: 1045)
[10:49:46] >> mysql_ping( Connection handle: 1 )
[10:49:46] CMySQLHandler:
ing() - You cannot call this function now. (Reason: Dead Connection)
[10:50:10] >> mysql_real_escape_string( Connection handle: 1 )
Вот сам код
#define SQL_HOST "localhost"
#define SQL_USER "root"
#define SQL_PASS ""
#define SQL_DB "server3"
public OnGameModeInit()
{
connectionHandle = mysql_connect(SQL_HOST,SQL_USER,SQL_PASS,SQL_DB);
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnPlayerConnect(playerid)
{
GetPlayerName(playerid, PlayerInfo[playerid][pSendername], MAX_PLAYER_NAME);
new str[128];
mysql_real_escape_string(PlayerInfo[playerid][pSendername], PlayerInfo[playerid][pSendername]);
format(str, sizeof(str),"SELECT `Name` FROM `Accounts` WHERE `Name` = '%s'", PlayerInfo[playerid][pSendername]);
mysql_function_query(connectionHandle, str, true, "ShowLogin","d", playerid);
return 1;
}
Помогите пожалуйста. Буду очень рад
Вот лог
[10:49:46] >> mysql_connect(localhost, root, , ******) on port 3306
[10:49:46] CMySQLHandler::CMySQLHandler() - constructor called.
[10:49:46] CMySQLHandler::CMySQLHandler() - Connecting to "localhost" | DB: "" | Username: "root"
[10:49:46] CMySQLHandler::Connect() - Access denied for user 'root'@'localhost' (using password: YES) (Error ID: 1045)
[10:49:46] >> mysql_ping( Connection handle: 1 )
[10:49:46] CMySQLHandler:
[10:50:10] >> mysql_real_escape_string( Connection handle: 1 )
Вот сам код
#define SQL_HOST "localhost"
#define SQL_USER "root"
#define SQL_PASS ""
#define SQL_DB "server3"
public OnGameModeInit()
{
connectionHandle = mysql_connect(SQL_HOST,SQL_USER,SQL_PASS,SQL_DB);
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnPlayerConnect(playerid)
{
GetPlayerName(playerid, PlayerInfo[playerid][pSendername], MAX_PLAYER_NAME);
new str[128];
mysql_real_escape_string(PlayerInfo[playerid][pSendername], PlayerInfo[playerid][pSendername]);
format(str, sizeof(str),"SELECT `Name` FROM `Accounts` WHERE `Name` = '%s'", PlayerInfo[playerid][pSendername]);
mysql_function_query(connectionHandle, str, true, "ShowLogin","d", playerid);
return 1;
}
Помогите пожалуйста. Буду очень рад
