18.01.2015, 12:17
(
Последний раз редактировалось ReD_HunTeR; 19.01.2015 в 15:49.
)
FIxed..
mysql_format(mysql, query, sizeof(query), "UPDATE `players` SET `Banned`='1', `Reason`='%s', `BannedBy`='%s' WHERE `Username` = '%e'", reason, PlayerName(playerid), name);
pawn Код:
|
You didn't explain the problem, this code seems to work.
Does it ban, doesn't ban at all, or the player can get in after being banned, also show to part where it bans the player if he tried to join. Also try to take a look at mysql_log at the server folder for any errors. |
Код:
[12:46:51] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called [12:47:32] [DEBUG] mysql_format - connection: 1, len: 128, format: "UPDATE `players` SET Banned='1', Reason='%s', BannedBy='%s', WHERE `Username` = '%e'" [12:47:32] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `players` SET Banned='1', Reason='', BannedBy='AYUB_KHAN'", callback: "(null)", format: "(null)" [12:47:32] [DEBUG] mysql_format - connection: 1, len: 128, format: "INSERT INTO `baninfo` (user_banned, user_banner, reason, ban_date) VALUES ('%e', '%e', '%e', '%e')" [12:47:32] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO `baninfo` (user_banned, user_banner, reason, ban_dat", callback: "(null)", format: "(null)" [12:47:32] [DEBUG] CMySQLQuery::Execute[] - starting query execution [12:47:32] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `Username` = '[CVT]ReD_HunTeR'' at line 1 [12:47:32] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError [12:47:32] [DEBUG] CMySQLQuery::Execute[] - starting query execution |