Skip to content

Commit

Permalink
Merge pull request #20 from Nord1cWarr1or/Nord1cWarr1or-patch-2
Browse files Browse the repository at this point in the history
player_prefs.sma: fix spacing in query
  • Loading branch information
ufame authored Dec 5, 2024
2 parents bf5ff28 + c17c780 commit d7c6577
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripting/player_prefs.sma
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public bool: native_set_key_default_value(iPlugin, iArgs) {
if (g_hSqlTuple != Empty_Handle) {
formatex(g_szQuery, charsmax(g_szQuery),
"INSERT INTO `pp_keys` (`key`, `default_value`) VALUES ('%s', '%s') \
ON DUPLICATE KEY UPDATE `default_value` = VALUES(`default_value`);",
ON DUPLICATE KEY UPDATE `default_value` = VALUES (`default_value`);",
szKey, szDefaultValue
);

Expand Down Expand Up @@ -208,7 +208,7 @@ stock SetPreference(iPlayer, szKey[], szValue[], szDefaultValue[]) {
// И даже если начинать с ключа, в колбеке всё ровно перепроверять g_tKeysIds (szData[3]) т.к. сраная асинхронщина
formatex(g_szQuery, charsmax(g_szQuery),
"INSERT INTO `pp_keys` (`key`, `default_value`) VALUES ('%s', '%s') \
ON DUPLICATE KEY UPDATE `default_value` = VALUES(`default_value`);",
ON DUPLICATE KEY UPDATE `default_value` = VALUES (`default_value`);",
szKey, szDefaultValue
);

Expand Down Expand Up @@ -374,7 +374,7 @@ public ThreadQuery_Handler(iFailState, Handle: hQuery, szError[], iError, szData

formatex(g_szQuery, charsmax(g_szQuery),
"INSERT INTO `pp_preferences` (`player_id`, `key_id`, `value`) VALUES (%d, %d, '%s') \
ON DUPLICATE KEY UPDATE `value` = VALUES(`value`);",
ON DUPLICATE KEY UPDATE `value` = VALUES (`value`);",
g_iPlayerDatabaseId[iPlayer], iKeyId, szData[4]
);

Expand Down

0 comments on commit d7c6577

Please sign in to comment.