SaveServerCfg()
{
format(slova, sizeof(slova), "UPDATE `serverpanel` SET `doublescore` = %d",sPanel[Doublescore]);
format(slova, sizeof(slova), "UPDATE `serverpanel` SET `carcapture` = %d",sPanel[CarCapture]);
format(slova, sizeof(slova), "UPDATE `serverpanel` SET `connectmessage` = %d",sPanel[ConnectMessage]);
format(slova, sizeof(slova), "UPDATE `serverpanel` SET `watchpm` = %d",sPanel[WatchPM]);
format(slova, sizeof(slova), "UPDATE `serverpanel` SET `zonesdebug` = %d",sPanel[ZonesDebug]);
format(slova, sizeof(slova), "UPDATE `serverpanel` SET `drugstats` = %d",DrugStats);
format(slova, sizeof(slova), "UPDATE `serverpanel` SET `weaponstats` = %d",WeaponStats);
mysql_query(slova);
}
Use https://sampwiki.blast.hk/wiki/Strcat to concatenate strings together.
|
SaveServerCfg()
{
format(slova, sizeof(slova), "UPDATE `serverpanel` SET `doublescore` = %d, `carcapture` = %d, `connectmessage` = %d, `watchpm` = %d, `zonesdebug` = %d, `drugstats` = %d, `weaponstats` = %d",
sPanel[Doublescore], sPanel[CarCapture], sPanel[ConnectMessage], sPanel[WatchPM], sPanel[ZonesDebug], DrugStats, WeaponStats);
mysql_query(slova);
}
Use https://sampwiki.blast.hk/wiki/Strcat to concatenate strings together.
|
pawn Код:
|
[14:05:41] --------------------------- [14:05:41] MySQL Debugging activated (01/08/14) [14:05:41] --------------------------- [14:05:41] [14:05:41] >> mysql_connect( ) [14:05:41] CMySQLHandler::CMySQLHandler() - constructor called. [14:05:41] CMySQLHandler::CMySQLHandler() - Connecting to "localhost" | DB: "samp23" | Username: "root" ... [14:05:41] CMySQLHandler::Connect() - Connection was successful. [14:05:41] CMySQLHandler::Connect() - Auto-Reconnect has been enabled. [14:05:41] >> mysql_query( Connection handle: 1 ) [14:05:41] CMySQLHandler::Query(SELECT * FROM serverpanel) - Successfully executed. [14:05:41] >> mysql_store_result( Connection handle: 1 ) [14:05:41] CMySQLHandler::StoreResult() - Result was stored. [14:05:41] >> mysql_num_rows( Connection handle: 1 ) [14:05:41] CMySQLHandler::NumRows() - Returned 1 row(s) [14:05:41] >> mysql_retrieve_row( Connection handle: 1 ) [14:05:41] >> mysql_fetch_field_row( Connection handle: 1 ) [14:05:41] CMySQLHandler::FetchField("doublescore") - 0 [14:05:41] >> mysql_fetch_field_row( Connection handle: 1 ) [14:05:41] CMySQLHandler::FetchField("carcapture") - 0 [14:05:41] >> mysql_fetch_field_row( Connection handle: 1 ) [14:05:41] CMySQLHandler::FetchField("connectmessage") - 1 [14:05:41] >> mysql_fetch_field_row( Connection handle: 1 ) [14:05:41] CMySQLHandler::FetchField("watchpm") - 1 [14:05:41] >> mysql_fetch_field_row( Connection handle: 1 ) [14:05:41] CMySQLHandler::FetchField("zonesdebug") - 0 [14:05:41] >> mysql_fetch_field_row( Connection handle: 1 ) [14:05:41] CMySQLHandler::FetchField("drugstats") - 0 [14:05:41] >> mysql_fetch_field_row( Connection handle: 1 ) [14:05:41] CMySQLHandler::FetchField("weaponstats") - 20 [14:05:41] >> mysql_free_result( Connection handle: 1 ) [14:05:41] CMySQLHandler::FreeResult() - Result was successfully free'd. [14:05:41] >> mysql_query( Connection handle: 1 ) [14:05:41] CMySQLHandler::Query(UPDATE `serverpanel` SET `doublescore` = 0, `carcapture` = 0, `connectmessage` = 1, `watchpm` = 1, `zonesdebug` = 0, `drugstats` = 0, `weaponstats` = 20) - Successfully executed. [14:05:41] >> mysql_query( Connection handle: 1 ) [14:05:41] CMySQLHandler::Query(SELECT * FROM serverpanel) - Successfully executed. [14:05:41] >> mysql_store_result( Connection handle: 1 ) [14:05:41] CMySQLHandler::StoreResult() - Result was stored. [14:05:41] >> mysql_num_rows( Connection handle: 1 ) [14:05:41] CMySQLHandler::NumRows() - Returned 1 row(s) [14:05:41] >> mysql_retrieve_row( Connection handle: 1 ) [14:05:41] >> mysql_fetch_field_row( Connection handle: 1 ) [14:05:41] CMySQLHandler::FetchField("doublescore") - 0 [14:05:41] >> mysql_fetch_field_row( Connection handle: 1 ) [14:05:41] CMySQLHandler::FetchField("carcapture") - 0 [14:05:41] >> mysql_fetch_field_row( Connection handle: 1 ) [14:05:41] CMySQLHandler::FetchField("connectmessage") - 1 [14:05:41] >> mysql_fetch_field_row( Connection handle: 1 ) [14:05:41] CMySQLHandler::FetchField("watchpm") - 1 [14:05:41] >> mysql_fetch_field_row( Connection handle: 1 ) [14:05:41] CMySQLHandler::FetchField("zonesdebug") - 0 [14:05:41] >> mysql_fetch_field_row( Connection handle: 1 ) [14:05:41] CMySQLHandler::FetchField("drugstats") - 0 [14:05:41] >> mysql_fetch_field_row( Connection handle: 1 ) [14:05:41] CMySQLHandler::FetchField("weaponstats") - 20 [14:05:41] >> mysql_free_result( Connection handle: 1 ) [14:05:41] CMySQLHandler::FreeResult() - Result was successfully free'd. [14:05:41] >> mysql_query( Connection handle: 1 ) [14:05:41] CMySQLHandler::Query(UPDATE `serverpanel` SET `doublescore` = 0, `carcapture` = 0, `connectmessage` = 1, `watchpm` = 1, `zonesdebug` = 0, `drugstats` = 0, `weaponstats` = 20) - Successfully executed.
[14:05:41] CMySQLHandler::Query(UPDATE `serverpanel` SET `doublescore` = 0, `carcapture` = 0, `connectmessage` = 1, `watchpm` = 1, `zonesdebug` = 0, `drugstats` = 0, `weaponstats` = 20) - Successfully executed.
What is not working ?
pawn Код:
|