Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

player_prefs.sma: fix spacing in query #20

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scripting/player_prefs.sma
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,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 @@ -205,7 +205,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 @@ -365,7 +365,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
Loading