I have a little problem when i combine the sash!
i have this error
SYSERR: Apr 8 15:50:19.516966 :: ChildLoop: AsyncSQL: query failed: 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 '' at line 1 (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip, vnum) VALUES('ITEM', NOW(), 1, 959897, 272989, 50000015, 'COMBINE (REFINE SUCCESS)', 'Esarfa Lord (custom) 1 ', errno: 1064)
log.cpp:
C
- #include "stdafx.h"
- #include "constants.h"
- #include "config.h"
- #include "log.h"
- #include "char.h"
- #include "desc.h"
- #include "item.h"
- #include "../../common/service.h"
- #include "locale_service.h"
- static char __escape_hint[1024];
- LogManager::LogManager() : m_bIsConnect(false)
- {
- }
- LogManager::~LogManager()
- {
- }
- bool LogManager::Connect(const char * host, const int port, const char * user, const char * pwd, const char * db)
- {
- if (m_sql.Setup(host, user, pwd, db, g_stLocale.c_str(), false, port))
- m_bIsConnect = true;
- return m_bIsConnect;
- }
- void LogManager::Query(const char * c_pszFormat, ...)
- {
- char szQuery[4096];
- va_list args;
- va_start(args, c_pszFormat);
- vsnprintf(szQuery, sizeof(szQuery), c_pszFormat, args);
- va_end(args);
- if (test_server)
- sys_log(0, "LOG: %s", szQuery);
- m_sql.AsyncQuery(szQuery);
- }
- bool LogManager::IsConnected()
- {
- return m_bIsConnect;
- }
- void LogManager::ItemLog(DWORD dwPID, DWORD x, DWORD y, DWORD dwItemID, const char * c_pszText, const char * c_pszHint, const char * c_pszIP, DWORD dwVnum)
- {
- m_sql.EscapeString(__escape_hint, sizeof(__escape_hint), c_pszHint, strlen(c_pszHint));
- Query("INSERT DELAYED INTO log%s (type, time, who, x, y, what, how, hint, ip, vnum) VALUES('ITEM', NOW(), %u, %u, %u, %u, '%s', '%s', '%s', %u)",
- get_table_postfix(), dwPID, x, y, dwItemID, c_pszText, __escape_hint, c_pszIP, dwVnum);
- }
- void LogManager::ItemLog(LPCHARACTER ch, LPITEM item, const char * c_pszText, const char * c_pszHint)
- {
- if (NULL == ch || NULL == item)
- {
- sys_err("character or item nil (ch %p item %p text %s)", get_pointer(ch), get_pointer(item), c_pszText);
- return;
- }
- ItemLog(ch->GetPlayerID(), ch->GetX(), ch->GetY(), item->GetID(),
- NULL == c_pszText ? "" : c_pszText,
- c_pszHint, ch->GetDesc() ? ch->GetDesc()->GetHostName() : "",
- item->GetOriginalVnum());
- }
- void LogManager::ItemLog(LPCHARACTER ch, int itemID, int itemVnum, const char * c_pszText, const char * c_pszHint)
- {
- ItemLog(ch->GetPlayerID(), ch->GetX(), ch->GetY(), itemID, c_pszText, c_pszHint, ch->GetDesc() ? ch->GetDesc()->GetHostName() : "", itemVnum);
- }
- void LogManager::CharLog(DWORD dwPID, DWORD x, DWORD y, DWORD dwValue, const char * c_pszText, const char * c_pszHint, const char * c_pszIP)
- {
- m_sql.EscapeString(__escape_hint, sizeof(__escape_hint), c_pszHint, strlen(c_pszHint));
- Query("INSERT DELAYED INTO log%s (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), %u, %u, %u, %u, '%s', '%s', '%s')",
- get_table_postfix(), dwPID, x, y, dwValue, c_pszText, __escape_hint, c_pszIP);
- }
- void LogManager::CharLog(LPCHARACTER ch, DWORD dw, const char * c_pszText, const char * c_pszHint)
- {
- if (ch)
- CharLog(ch->GetPlayerID(), ch->GetX(), ch->GetY(), dw, c_pszText, c_pszHint, ch->GetDesc() ? ch->GetDesc()->GetHostName() : "");
- else
- CharLog(0, 0, 0, dw, c_pszText, c_pszHint, "");
- }
- void LogManager::LoginLog(bool isLogin, DWORD dwAccountID, DWORD dwPID, BYTE bLevel, BYTE bJob, DWORD dwPlayTime)
- {
- Query("INSERT DELAYED INTO loginlog%s (type, time, channel, account_id, pid, level, job, playtime) VALUES (%s, NOW(), %d, %u, %u, %d, %d, %u)",
- get_table_postfix(), isLogin ? "'LOGIN'" : "'LOGOUT'", g_bChannel, dwAccountID, dwPID, bLevel, bJob, dwPlayTime);
- }
- #ifdef __GOLD_AS_LL__
- void LogManager::MoneyLog(BYTE type, DWORD vnum, long long gold)
- #else
- void LogManager::MoneyLog(BYTE type, DWORD vnum, int gold)
- #endif
- {
- if (type == MONEY_LOG_RESERVED || type >= MONEY_LOG_TYPE_MAX_NUM)
- {
- #ifdef __GOLD_AS_LL__
- sys_err("TYPE ERROR: type %d vnum %u gold %lld", type, vnum, gold);
- #else
- sys_err("TYPE ERROR: type %d vnum %u gold %d", type, vnum, gold);
- #endif
- return;
- }
- #ifdef __GOLD_AS_LL__
- Query("INSERT DELAYED INTO money_log%s VALUES (NOW(), %d, %d, %lld)", get_table_postfix(), type, vnum, gold);
- #else
- Query("INSERT DELAYED INTO money_log%s VALUES (NOW(), %d, %d, %d)", get_table_postfix(), type, vnum, gold);
- #endif
- }
- void LogManager::HackLog(const char * c_pszHackName, const char * c_pszLogin, const char * c_pszName, const char * c_pszIP)
- {
- m_sql.EscapeString(__escape_hint, sizeof(__escape_hint), c_pszHackName, strlen(c_pszHackName));
- Query("INSERT INTO hack_log (time, login, name, ip, server, why) VALUES(NOW(), '%s', '%s', '%s', '%s', '%s')", c_pszLogin, c_pszName, c_pszIP, g_stHostname.c_str(), __escape_hint);
- }
- void LogManager::HackLog(const char * c_pszHackName, LPCHARACTER ch)
- {
- if (ch->GetDesc())
- {
- HackLog(c_pszHackName,
- ch->GetDesc()->GetAccountTable().login,
- ch->GetName(),
- ch->GetDesc()->GetHostName());
- }
- }
- void LogManager::HackCRCLog(const char * c_pszHackName, const char * c_pszLogin, const char * c_pszName, const char * c_pszIP, DWORD dwCRC)
- {
- Query("INSERT INTO hack_crc_log (time, login, name, ip, server, why, crc) VALUES(NOW(), '%s', '%s', '%s', '%s', '%s', %u)", c_pszLogin, c_pszName, c_pszIP, g_stHostname.c_str(), c_pszHackName, dwCRC);
- }
- void LogManager::PCBangLoginLog(DWORD dwPCBangID, const char* c_szPCBangIP, DWORD dwPlayerID, DWORD dwPlayTime)
- {
- Query("INSERT INTO pcbang_loginlog (time, pcbang_id, ip, pid, play_time) VALUES (NOW(), %u, '%s', %u, %u)",
- dwPCBangID, c_szPCBangIP, dwPlayerID, dwPlayTime);
- }
- void LogManager::GoldBarLog(DWORD dwPID, DWORD dwItemID, GOLDBAR_HOW eHow, const char* c_pszHint)
- {
- char szHow[32+1];
- switch (eHow)
- {
- case PERSONAL_SHOP_BUY:
- snprintf(szHow, sizeof(szHow), "'BUY'");
- break;
- case PERSONAL_SHOP_SELL:
- snprintf(szHow, sizeof(szHow), "'SELL'");
- break;
- case SHOP_BUY:
- snprintf(szHow, sizeof(szHow), "'SHOP_BUY'");
- break;
- case SHOP_SELL:
- snprintf(szHow, sizeof(szHow), "'SHOP_SELL'");
- break;
- case EXCHANGE_TAKE:
- snprintf(szHow, sizeof(szHow), "'EXCHANGE_TAKE'");
- break;
- case EXCHANGE_GIVE:
- snprintf(szHow, sizeof(szHow), "'EXCHANGE_GIVE'");
- break;
- case QUEST:
- snprintf(szHow, sizeof(szHow), "'QUEST'");
- break;
- default:
- snprintf(szHow, sizeof(szHow), "''");
- break;
- }
- Query("INSERT DELAYED INTO goldlog%s (date, time, pid, what, how, hint) VALUES(CURDATE(), CURTIME(), %u, %u, %s, '%s')",
- get_table_postfix(), dwPID, dwItemID, szHow, c_pszHint);
- }
- void LogManager::CubeLog(DWORD dwPID, DWORD x, DWORD y, DWORD item_vnum, DWORD item_uid, int item_count, bool success)
- {
- Query("INSERT DELAYED INTO cube%s (pid, time, x, y, item_vnum, item_uid, item_count, success) "
- "VALUES(%u, NOW(), %u, %u, %u, %u, %d, %d)",
- get_table_postfix(), dwPID, x, y, item_vnum, item_uid, item_count, success?1:0);
- }
- void LogManager::SpeedHackLog(DWORD pid, DWORD x, DWORD y, int hack_count)
- {
- Query("INSERT INTO speed_hack%s (pid, time, x, y, hack_count) "
- "VALUES(%u, NOW(), %u, %u, %d)",
- get_table_postfix(), pid, x, y, hack_count);
- }
- void LogManager::ChangeNameLog(DWORD pid, const char *old_name, const char *new_name, const char *ip)
- {
- Query("INSERT DELAYED INTO change_name%s (pid, old_name, new_name, time, ip) "
- "VALUES(%u, '%s', '%s', NOW(), '%s') ",
- get_table_postfix(), pid, old_name, new_name, ip);
- }
- void LogManager::GMCommandLog(DWORD dwPID, const char* szName, const char* szIP, BYTE byChannel, const char* szCommand)
- {
- m_sql.EscapeString(__escape_hint, sizeof(__escape_hint), szCommand, strlen(szCommand));
- Query("INSERT DELAYED INTO command_log%s (userid, server, ip, port, username, command, date ) "
- "VALUES(%u, 999, '%s', %u, '%s', '%s', NOW()) ",
- get_table_postfix(), dwPID, szIP, byChannel, szName, __escape_hint);
- }
- void LogManager::RefineLog(DWORD pid, const char* item_name, DWORD item_id, int item_refine_level, int is_success, const char* how)
- {
- m_sql.EscapeString(__escape_hint, sizeof(__escape_hint), item_name, strlen(item_name));
- Query("INSERT INTO refinelog%s (pid, item_name, item_id, step, time, is_success, setType) VALUES(%u, '%s', %u, %d, NOW(), %d, '%s')",
- get_table_postfix(), pid, __escape_hint, item_id, item_refine_level, is_success, how);
- }
- void LogManager::ShoutLog(BYTE bChannel, BYTE bEmpire, const char * pszText)
- {
- m_sql.EscapeString(__escape_hint, sizeof(__escape_hint), pszText, strlen(pszText));
- Query("INSERT INTO shout_log%s VALUES(NOW(), %d, %d,'%s')", get_table_postfix(), bChannel, bEmpire, __escape_hint);
- }
- void LogManager::LevelLog(LPCHARACTER pChar, unsigned int level, unsigned int playhour)
- {
- if (true == LC_IsEurope())
- {
- DWORD aid = 0;
- if (NULL != pChar->GetDesc())
- {
- aid = pChar->GetDesc()->GetAccountTable().id;
- }
- Query("REPLACE INTO levellog%s (name, level, time, account_id, pid, playtime) VALUES('%s', %u, NOW(), %u, %u, %d)",
- get_table_postfix(), pChar->GetName(), level, aid, pChar->GetPlayerID(), playhour);
- }
- else
- {
- Query("REPLACE INTO levellog%s (name, level, time, playtime) VALUES('%s', %u, NOW(), %d)",
- get_table_postfix(), pChar->GetName(), level, playhour);
- }
- }
- void LogManager::BootLog(const char * c_pszHostName, BYTE bChannel)
- {
- Query("INSERT INTO bootlog (time, hostname, channel) VALUES(NOW(), '%s', %d)",
- c_pszHostName, bChannel);
- }
- void LogManager::VCardLog(DWORD vcard_id, DWORD x, DWORD y, const char * hostname, const char * giver_name, const char * giver_ip, const char * taker_name, const char * taker_ip)
- {
- Query("INSERT DELAYED INTO vcard_log (vcard_id, x, y, hostname, giver_name, giver_ip, taker_name, taker_ip) VALUES(%u, %u, %u, '%s', '%s', '%s', '%s', '%s')",
- vcard_id, x, y, hostname, giver_name, giver_ip, taker_name, taker_ip);
- }
- void LogManager::FishLog(DWORD dwPID, int prob_idx, int fish_id, int fish_level, DWORD dwMiliseconds, DWORD dwVnum, DWORD dwValue)
- {
- Query("INSERT INTO fish_log%s VALUES(NOW(), %u, %d, %u, %d, %u, %u, %u)",
- get_table_postfix(),
- dwPID,
- prob_idx,
- fish_id,
- fish_level,
- dwMiliseconds,
- dwVnum,
- dwValue);
- }
- void LogManager::QuestRewardLog(const char * c_pszQuestName, DWORD dwPID, DWORD dwLevel, int iValue1, int iValue2)
- {
- Query("INSERT INTO quest_reward_log%s VALUES('%s',%u,%u,2,%u,%u,NOW())",
- get_table_postfix(),
- c_pszQuestName,
- dwPID,
- dwLevel,
- iValue1,
- iValue2);
- }
- void LogManager::DetailLoginLog(bool isLogin, LPCHARACTER ch)
- {
- if (NULL == ch->GetDesc())
- return;
- if (true == isLogin)
- {
- Query("INSERT INTO loginlog2(type, is_gm, login_time, channel, account_id, pid, ip, client_version) "
- "VALUES('INVALID', %s, NOW(), %d, %u, %u, inet_aton('%s'), '%s')",
- ch->IsGM() == true ? "'Y'" : "'N'",
- g_bChannel,
- ch->GetDesc()->GetAccountTable().id,
- ch->GetPlayerID(),
- ch->GetDesc()->GetHostName(),
- ch->GetDesc()->GetClientVersion());
- }
- else
- {
- Query("SET @i = (SELECT MAX(id) FROM loginlog2 WHERE account_id=%u AND pid=%u)",
- ch->GetDesc()->GetAccountTable().id,
- ch->GetPlayerID());
- Query("UPDATE loginlog2 SET type='VALID', logout_time=NOW(), playtime=TIMEDIFF(logout_time,login_time) WHERE id=@i");
- }
- }
- void LogManager::DragonSlayLog(DWORD dwGuildID, DWORD dwDragonVnum, DWORD dwStartTime, DWORD dwEndTime)
- {
- Query( "INSERT INTO dragon_slay_log%s VALUES( %d, %d, FROM_UNIXTIME(%d), FROM_UNIXTIME(%d) )",
- get_table_postfix(),
- dwGuildID, dwDragonVnum, dwStartTime, dwEndTime);
- }
- void LogManager::HackShieldLog(unsigned long ErrorCode, LPCHARACTER ch)
- {
- struct in_addr st_addr;
- #ifndef __WIN32__
- if (0 == inet_aton(ch->GetDesc()->GetHostName(), &st_addr))
- #else
- unsigned long in_address;
- in_address = inet_addr(ch->GetDesc()->GetHostName());
- st_addr.s_addr = in_address;
- if (INADDR_NONE == in_address)
- #endif
- {
- Query( "INSERT INTO hackshield_log(time, account_id, login, pid, name, reason, ip) "
- "VALUES(NOW(), %u, '%s', %u, '%s', %u, 0)",
- ch->GetDesc()->GetAccountTable().id, ch->GetDesc()->GetAccountTable().login,
- ch->GetPlayerID(), ch->GetName(),
- ErrorCode);
- }
- else
- {
- Query( "INSERT INTO hackshield_log(time, account_id, login, pid, name, reason, ip) "
- "VALUES(NOW(), %u, '%s', %u, '%s', %u, inet_aton('%s'))",
- ch->GetDesc()->GetAccountTable().id, ch->GetDesc()->GetAccountTable().login,
- ch->GetPlayerID(), ch->GetName(),
- ErrorCode,
- ch->GetDesc()->GetHostName());
- }
- }
- #ifdef __GOLD_BARS__
- void LogManager::GoldBarsLog(DWORD dwPlayerID, DWORD dwAID, DWORD dwVnum, int dlCount)
- {
- Query("INSERT INTO voucher_yang_log (player_id, account_id, item_vnum, valoare_yang, data) VALUES('%u', '%u' , '%u' , '%u' , NOW() )" , dwPlayerID, dwAID, dwVnum, dlCount);
- }
- #endif
- #ifdef __VOUCHER_JD__
- void LogManager::JetoaneDragonLog(DWORD dwPlayerID, DWORD dwAID, DWORD dwVnum, int iCount)
- {
- Query("INSERT INTO voucher_jd_log (player_id, account_id, item_vnum, jetoane_dragon, data) VALUES('%u', '%u', '%u', '%u', NOW())", dwPlayerID, dwAID, dwVnum, iCount);
- }
- #endif
- #ifdef __VOUCHER_MD__
- void LogManager::MonedeDragonLog(DWORD dwPlayerID, DWORD dwAID, DWORD dwVnum, int iCount)
- {
- Query("INSERT INTO voucher_md_log (player_id, account_id, item_vnum, monede_dragon, data) VALUES('%u', '%u', '%u', '%u', NOW())", dwPlayerID, dwAID, dwVnum, iCount);
- }
- #endif
- #ifdef __SASH_SYSTEM__
- void LogManager::SashLog(DWORD dwPID, DWORD x, DWORD y, DWORD item_vnum, DWORD item_uid, int item_count, int abs_chance, bool success)
- {
- Query("INSERT DELAYED INTO sash_log%s (pid, time, x, y, item_vnum, item_uid, item_count, item_abs_chance, success) VALUES(%u, NOW(), %u, %u, %u, %u, %d, %d, %d)", get_table_postfix(), dwPID, x, y, item_vnum, item_uid, item_count, abs_chance, success ? 1 : 0);
- }
- #endif
log.h
C
- #ifndef __INC_LOG_MANAGER_H__
- #define __INC_LOG_MANAGER_H__
- #include "../../libsql/AsyncSQL.h"
- #include "any_function.h"
- enum GOLDBAR_HOW
- {
- PERSONAL_SHOP_BUY = 1 ,
- PERSONAL_SHOP_SELL = 2 ,
- SHOP_BUY = 3 ,
- SHOP_SELL = 4 ,
- EXCHANGE_TAKE = 5 ,
- EXCHANGE_GIVE = 6 ,
- QUEST = 7 ,
- };
- class LogManager : public singleton<LogManager>
- {
- public:
- LogManager();
- virtual ~LogManager();
- bool IsConnected();
- bool Connect(const char * host, const int port, const char * user, const char * pwd, const char * db);
- void ItemLog(DWORD dwPID, DWORD x, DWORD y, DWORD dwItemID, const char * c_pszText, const char * c_pszHint, const char * c_pszIP, DWORD dwVnum);
- void ItemLog(LPCHARACTER ch, LPITEM item, const char * c_pszText, const char * c_pszHint);
- void ItemLog(LPCHARACTER ch, int itemID, int itemVnum, const char * c_pszText, const char * c_pszHint);
- void CharLog(DWORD dwPID, DWORD x, DWORD y, DWORD dw, const char * c_pszText, const char * c_pszHint, const char * c_pszIP);
- void CharLog(LPCHARACTER ch, DWORD dw, const char * c_pszText, const char * c_pszHint);
- void LoginLog(bool isLogin, DWORD dwAccountID, DWORD dwPID, BYTE bLevel, BYTE bJob, DWORD dwPlayTime);
- #ifdef __GOLD_AS_LL__
- void MoneyLog(BYTE type, DWORD vnum, long long gold);
- #else
- void MoneyLog(BYTE type, DWORD vnum, int gold);
- #endif
- void HackLog(const char * c_pszHackName, const char * c_pszLogin, const char * c_pszName, const char * c_pszIP);
- void HackLog(const char * c_pszHackName, LPCHARACTER ch);
- void HackCRCLog(const char * c_pszHackName, const char * c_pszLogin, const char * c_pszName, const char * c_pszIP, DWORD dwCRC);
- void GoldBarLog(DWORD dwPID, DWORD dwItemID, GOLDBAR_HOW eHow, const char * c_pszHint);
- void PCBangLoginLog(DWORD dwPCBangID, const char * c_szPCBangIP, DWORD dwPlayerID, DWORD dwPlayTime);
- void CubeLog(DWORD dwPID, DWORD x, DWORD y, DWORD item_vnum, DWORD item_uid, int item_count, bool success);
- void GMCommandLog(DWORD dwPID, const char * szName, const char * szIP, BYTE byChannel, const char * szCommand);
- void SpeedHackLog(DWORD pid, DWORD x, DWORD y, int hack_count);
- void ChangeNameLog(DWORD pid, const char * old_name, const char * new_name, const char * ip);
- void RefineLog(DWORD pid, const char * item_name, DWORD item_id, int item_refine_level, int is_success, const char * how);
- void ShoutLog(BYTE bChannel, BYTE bEmpire, const char * pszText);
- void LevelLog(LPCHARACTER pChar, unsigned int level, unsigned int playhour);
- void BootLog(const char * c_pszHostName, BYTE bChannel);
- void VCardLog(DWORD vcard_id, DWORD x, DWORD y, const char * hostname, const char * giver_name, const char * giver_ip, const char * taker_name, const char * taker_ip);
- void FishLog(DWORD dwPID, int prob_idx, int fish_id, int fish_level, DWORD dwMiliseconds, DWORD dwVnum = false, DWORD dwValue = 0);
- void QuestRewardLog(const char * c_pszQuestName, DWORD dwPID, DWORD dwLevel, int iValue1, int iValue2);
- void DetailLoginLog(bool isLogin, LPCHARACTER ch);
- void DragonSlayLog(DWORD dwGuildID, DWORD dwDragonVnum, DWORD dwStartTime, DWORD dwEndTime);
- void HackShieldLog(unsigned long ErrorCode, LPCHARACTER ch);
- #ifdef __GOLD_BARS__
- void GoldBarsLog(DWORD dwAID, DWORD dwPlayerID, DWORD dwVnum, int dlCount);
- #endif
- #ifdef __VOUCHER_JD__
- void JetoaneDragonLog(DWORD dwPlayerID, DWORD dwAID, DWORD dwVnum, int iCount);
- #endif
- #ifdef __VOUCHER_MD__
- void MonedeDragonLog(DWORD dwPlayerID, DWORD dwAID, DWORD dwVnum, int iCount);
- #endif
- #ifdef __SASH_SYSTEM__
- void SashLog(DWORD dwPID, DWORD x, DWORD y, DWORD item_vnum, DWORD item_uid, int item_count, int abs_chance, bool success);
- #endif
- private:
- void Query(const char * c_pszFormat, ...);
- CAsyncSQL m_sql;
- bool m_bIsConnect;
- };
- #endif
my log structure table is:
Code
- SET NAMES utf8mb4;
- SET FOREIGN_KEY_CHECKS = 0;
- -- ----------------------------
- -- Table structure for log
- -- ----------------------------
- DROP TABLE IF EXISTS `log`;
- CREATE TABLE `log` (
- `ID` int(11) NULL DEFAULT NULL,
- `type` varchar(20) CHARACTER SET big5 COLLATE big5_bin NULL DEFAULT NULL,
- `time` datetime NULL DEFAULT NULL,
- `who` int(11) NULL DEFAULT NULL,
- `x` int(11) NULL DEFAULT NULL,
- `y` int(11) NULL DEFAULT NULL,
- `what` int(11) NULL DEFAULT NULL,
- `how` varchar(20) CHARACTER SET big5 COLLATE big5_bin NULL DEFAULT NULL,
- `hint` varchar(20) CHARACTER SET big5 COLLATE big5_bin NULL DEFAULT NULL,
- `ip` varchar(30) CHARACTER SET big5 COLLATE big5_bin NULL DEFAULT NULL,
- `vnum` int(50) NULL DEFAULT NULL
- ) ENGINE = MyISAM CHARACTER SET = big5 COLLATE = big5_bin ROW_FORMAT = Dynamic;
- SET FOREIGN_KEY_CHECKS = 1;