Tommy_Wilson
Умник
Код:
[code][11:21:05] [DEBUG] mysql_format - connection: 1, len: 2524, format: "SELECT * FROM `Accounts` WHERE `Name` = '%e'"
[11:21:05] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `Accounts` WHERE `Name` = 'SenseG'", callback: "ClearBusiness", format: "d"
[11:21:05] [DEBUG] mysql_format - connection: 1, len: 2524, format: "UPDATE `bizz` SET "
[11:21:05] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `bizz` SET `bOwner`= 'None',`bType`= '4',`bPrice`= '50000", callback: "(null)", format: "(null)"
[11:21:05] [DEBUG] CMySQLQuery::Execute[ClearBusiness] - starting query execution
[11:21:05] [DEBUG] CMySQLQuery::Execute[ClearBusiness] - query was successfully executed within 1.62 milliseconds
[11:21:05] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[11:21:05] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[11:21:05] [DEBUG] Calling callback "ClearBusiness"..
[11:21:05] [DEBUG] cache_get_data - connection: 1
[11:21:05] [DEBUG] cache_get_field_content - row: 0, field_name: "Texts", connection: 1, max_len: 16
[11:21:05] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Texts", data: "0, 0, 0"
[11:21:05] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `Accounts` SET `Texts` = '1, 0, 0', `Bank` = 'Bank+0' WHE", callback: "(null)", format: "(null)"
[11:21:05] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[11:21:05] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 0.751 milliseconds
[11:21:05] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
[11:21:05] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[11:21:05] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 0.168 milliseconds
[11:21:05] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
Проблема в том что не обновляет запрос в аккаунт, после продажи бизнеса, мне нужно присвоить значение Texts, 1. На первую ячейку. Да, в списке логе он присваивает, но
в аккаунте его нет. Не доходит запрос до моего аккаунта. Так-же почему-то деньги в банк 0, хотя продал по стоимости.
Сам запрос,
Код:
stock ClearBizz(i)
{
new playerid;
sscanf(BizzInfo[i][bOwner], "u", playerid);
if(IsPlayerConnected(playerid))
{
PINFO[playerid][pBank] += BizzInfo[i][bBuyPrice] / 2;
SetPVarInt(playerid, "GetBizz", 1);
}
else
{
mysql_format(mysql, mysql_string, sizeof(mysql_string), "SELECT * FROM `Accounts` WHERE `Name` = '%e'", BizzInfo[i][bOwner]);
mysql_function_query(mysql, mysql_string, true, "ClearBusiness", "d",i);
}
BizzPay[i] = 0;
BizzInfo[i][bLock] = 0;
BizzInfo[i][bMafia] = 0;
BizzInfo[i][bMoney] = 0;
BizzInfo[i][bLic] = 0;
BizzInfo[i][bEnter] = 100;
BizzInfo[i][bTill] = 50;
BizzInfo[i][bLockTime] = 0;
BizzInfo[i][bProduct] = 0;
strmid(BizzInfo[i][bOwner], "None", 0, strlen("None"), MAX_PLAYER_NAME);
SaveBizz(i);
UpdateBizz(i);
return true;
}
public ClearBusiness(i)
{
new texts[30], text[30];
new r,f;
cache_get_data(r, f);
if(r)
{
cache_get_field_content(0, "Texts",texts,mysql,16);
sscanf(texts, "p<,>a<i>[3]", text);
format(texts, sizeof(texts),"1, %i, %i", text[1], text[2]);
format(mysql_string,sizeof(mysql_string), "UPDATE `Accounts` SET `Texts` = '%s', `Bank` = 'Bank+%i' WHERE `Name` = '%s'",texts,BizzInfo[i][bBuyPrice] / 2,BizzInfo[i][bOwner]);
mysql_function_query(mysql, mysql_string, false, "", "");
}
BizzInfo[i][bBuyPrice] = 0;
return true;
}
