09.06.2012, 19:14
(
Последний раз редактировалось xxmitsu; 10.06.2012 в 05:54.
)
The compiled version of R7-2 source can be found at the address: http://www.egaming.ro/MySQL/ or http://mirror1.egaming.ro/MySQL/
The compiled version of R7-2 source can be found at the address: http://www.egaming.ro/MySQL/
|
stock SaveStatistic()
{
new szQuery[289];
format(szQuery, 289, "UPDATE `statistika` SET `RekordoData` = '%s', `Saskaitos` = '%d', `Prisijungimai` = '%d', `Suimimai` = '%d', `Rekordas` = '%d', `DuotosBaudos` = '%d', `Ismetimai` = '%d', `Uzblokavimai` = '%d'",
sInfo[szRecordDate], sInfo[iAccounts], sInfo[iConnects], sInfo[iArrests], sInfo[iRecord], sInfo[iFines], sInfo[iKicks], sInfo[iBans]);
mysql_function_query(iHandle, szQuery, false, "", "");
}
#define LoadStatistic() mysql_function_query(iHandle, "SELECT * FROM `statistika`", true, "OnServerStatisticLoad", "")
PUB::OnServerStatisticLoad()
{
new
iFields,
iRows;
cache_get_data(iRows, iFields);
if (iRows)
{
new szResult[12];
cache_get_row(0, 0, sInfo[szRecordDate]);
cache_get_row(0, 1, szResult); sInfo[iAccounts] = strval(szResult);
cache_get_row(0, 2, szResult); sInfo[iConnects] = strval(szResult);
cache_get_row(0, 3, szResult); sInfo[iArrests] = strval(szResult);
cache_get_row(0, 4, szResult); sInfo[iRecord] = strval(szResult);
cache_get_row(0, 5, szResult); sInfo[iFines] = strval(szResult);
cache_get_row(0, 6, szResult); sInfo[iKicks] = strval(szResult);
cache_get_row(0, 7, szResult); sInfo[iBans] = strval(szResult);
}
return true;
}
[22:37:35] >> mysql_num_rows( Connection handle: 1 ) [22:37:35] CMySQLHandler::NumRows() - You cannot call this function now. (Reason: Dead Connection)
Using KickPlayer in callback, which get called by mysql_function_query, shows 'Lost connection to server' for client, which should be kicked. Can anyone confirm this?
|
mysql_fetch_field(0,field[]); |
Which version are you using? If you're using R7 check where you load the players information cause it happened to me, I was loading something which wasn't actually in my players database, after I added it, it stopped crashing. ( sorry if i'm wrong with this, it's only an example ).
|
PHP код:
|