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

Update database.sp #244

Closed
wants to merge 2 commits into from
Closed

Update database.sp #244

wants to merge 2 commits into from

Conversation

Ferks-FK
Copy link

@Ferks-FK Ferks-FK commented Dec 3, 2021

Attempted fix for problem #176

Someone needs to test this patch, I didn't have time to test it.

Attempted fix for problem #176
@crashzk
Copy link
Contributor

crashzk commented Dec 12, 2021

@Ferks-FK I made the change to my plugin, I'll be testing it and I'll return here with feedback.

If you have any method that I can test faster just say that I see it here, for now I just sent the plugin with the changes and I'll keep checking the logs.

@Ferks-FK
Copy link
Author

If you have any method that I can test faster just say that I see it here, for now I just sent the plugin with the changes and I'll keep checking the logs.

Ok, thanks for the contribution 👍

@crashzk
Copy link
Contributor

crashzk commented Dec 12, 2021

@Ferks-FK It started to show the following errors in the log:

L 12/12/2021 - 09:42:17: [SM] Exception reported: String formatted incorrectly - parameter 6 (total 5)
L 12/12/2021 - 09:42:17: [SM] Blaming: weapons.smx
L 12/12/2021 - 09:42:17: [SM] Call stack trace:
L 12/12/2021 - 09:42:17: [SM]   [0] FormatEx
L 12/12/2021 - 09:42:17: [SM]   [1] Line 908, weapons/database.sp::CreatePlayerData
L 12/12/2021 - 09:42:17: [SM]   [2] Line 40, weapons/database.sp::T_GetPlayerDataCallback
L 12/12/2021 - 09:45:04: [SM] Exception reported: String formatted incorrectly - parameter 6 (total 5)
L 12/12/2021 - 09:45:04: [SM] Blaming: weapons.smx
L 12/12/2021 - 09:45:04: [SM] Call stack trace:
L 12/12/2021 - 09:45:04: [SM]   [0] FormatEx
L 12/12/2021 - 09:45:04: [SM]   [1] Line 908, weapons/database.sp::CreatePlayerData
L 12/12/2021 - 09:45:04: [SM]   [2] Line 40, weapons/database.sp::T_GetPlayerDataCallback
L 12/12/2021 - 10:22:21: Error log file session closed.
L 12/12/2021 - 10:39:57: SourceMod error session started
L 12/12/2021 - 10:39:57: Info (map "de_dust2") (file "/home/clientes/OGP_User_Files/whmcs/2975/csgo/addons/sourcemod/logs/errors_20211212.log")
L 12/12/2021 - 10:39:57: [SM] Exception reported: String formatted incorrectly - parameter 6 (total 5)
L 12/12/2021 - 10:39:57: [SM] Blaming: weapons.smx
L 12/12/2021 - 10:39:57: [SM] Call stack trace:
L 12/12/2021 - 10:39:57: [SM]   [0] FormatEx
L 12/12/2021 - 10:39:57: [SM]   [1] Line 908, weapons/database.sp::CreatePlayerData
L 12/12/2021 - 10:39:57: [SM]   [2] Line 40, weapons/database.sp::T_GetPlayerDataCallback
L 12/12/2021 - 10:57:44: Error log file session closed.

@Ferks-FK
Copy link
Author

@Ferks-FK It started to show the following errors in the log:

L 12/12/2021 - 09:42:17: [SM] Exception reported: String formatted incorrectly - parameter 6 (total 5)
L 12/12/2021 - 09:42:17: [SM] Blaming: weapons.smx
L 12/12/2021 - 09:42:17: [SM] Call stack trace:
L 12/12/2021 - 09:42:17: [SM]   [0] FormatEx
L 12/12/2021 - 09:42:17: [SM]   [1] Line 908, weapons/database.sp::CreatePlayerData
L 12/12/2021 - 09:42:17: [SM]   [2] Line 40, weapons/database.sp::T_GetPlayerDataCallback
L 12/12/2021 - 09:45:04: [SM] Exception reported: String formatted incorrectly - parameter 6 (total 5)
L 12/12/2021 - 09:45:04: [SM] Blaming: weapons.smx
L 12/12/2021 - 09:45:04: [SM] Call stack trace:
L 12/12/2021 - 09:45:04: [SM]   [0] FormatEx
L 12/12/2021 - 09:45:04: [SM]   [1] Line 908, weapons/database.sp::CreatePlayerData
L 12/12/2021 - 09:45:04: [SM]   [2] Line 40, weapons/database.sp::T_GetPlayerDataCallback
L 12/12/2021 - 10:22:21: Error log file session closed.
L 12/12/2021 - 10:39:57: SourceMod error session started
L 12/12/2021 - 10:39:57: Info (map "de_dust2") (file "/home/clientes/OGP_User_Files/whmcs/2975/csgo/addons/sourcemod/logs/errors_20211212.log")
L 12/12/2021 - 10:39:57: [SM] Exception reported: String formatted incorrectly - parameter 6 (total 5)
L 12/12/2021 - 10:39:57: [SM] Blaming: weapons.smx
L 12/12/2021 - 10:39:57: [SM] Call stack trace:
L 12/12/2021 - 10:39:57: [SM]   [0] FormatEx
L 12/12/2021 - 10:39:57: [SM]   [1] Line 908, weapons/database.sp::CreatePlayerData
L 12/12/2021 - 10:39:57: [SM]   [2] Line 40, weapons/database.sp::T_GetPlayerDataCallback
L 12/12/2021 - 10:57:44: Error log file session closed.

Fix a syntax error, recompile with updated file and test again please.

@crashzk
Copy link
Contributor

crashzk commented Dec 13, 2021

@Ferks-FK so far no errors.

I'm still watching, anything back here.

@Ferks-FK
Copy link
Author

@Ferks-FK so far no errors.

I'm still watching, anything back here.

The syntax error will probably not show up anymore, now we need to know about the main error.
Do you have any ideas on how to reproduce it?
Or should we just wait?

@crashzk
Copy link
Contributor

crashzk commented Dec 13, 2021

The syntax error will probably not show up anymore, now we need to know about the main error. Do you have any ideas on how to reproduce it? Or should we just wait?

I believe that just waiting, it has been more than 12 hours since I applied this correction, until the moment without errors.

In this case, there is only this:

L 12/13/2021 - 10:20:37: [weapons.smx] Update Player failed! query: "UPDATE weapons SET ak47_trak_count = 1027 WHERE steamid = 'STEAM_1:0:518785840'" error: "Lost connection to MySQL server during query"

But I believe it's my own MySQL database error, and this error has only appeared once so far.

@Ferks-FK
Copy link
Author

The syntax error will probably not show up anymore, now we need to know about the main error. Do you have any ideas on how to reproduce it? Or should we just wait?

I believe that just waiting, it has been more than 12 hours since I applied this correction, until the moment without errors.

In this case, there is only this:

L 12/13/2021 - 10:20:37: [weapons.smx] Update Player failed! query: "UPDATE weapons SET ak47_trak_count = 1027 WHERE steamid = 'STEAM_1:0:518785840'" error: "Lost connection to MySQL server during query"

But I believe it's my own MySQL database error, and this error has only appeared once so far.

Yes, it is an error related to your mysql

@crashzk
Copy link
Contributor

crashzk commented Dec 16, 2021

@Ferks-FK I don't get any more errors with weapons.smx plugins regarding this issues: #176

I believe it can be merged into the master branch and marked as fixed.

@Ferks-FK
Copy link
Author

@Ferks-FK I don't get any more errors with weapons.smx plugins regarding this issues: #176

I believe it can be merged into the master branch and marked as fixed.

Thanks for the contribution ❤

@crashzk
Copy link
Contributor

crashzk commented Jan 7, 2022

Just feedback @Ferks-FK. So far no errors related to issues #176 after implementing this change.

I believe it can be merged into the branch master of the project by @kgns.

@kgns
Copy link
Owner

kgns commented Jan 7, 2022

Are you handling SQLite also? I think INSERT ... ON DUPLICATE KEY UPDATE and INSERT IGNORE are MySQL syntax. On SQLite there was INSERT OR IGNORE but I'm not current on these db concepts. Can you check if this works when SQLite is used?

@Ferks-FK
Copy link
Author

Ferks-FK commented Jan 8, 2022

Are you handling SQLite also? I think INSERT ... ON DUPLICATE KEY UPDATE and INSERT IGNORE are MySQL syntax. On SQLite there was INSERT OR IGNORE but I'm not current on these db concepts. Can you check if this works when SQLite is used?

I am not sure about this, I am on servers set up to test now, if anyone can test this I would appreciate it.

@crashzk
Copy link
Contributor

crashzk commented Jan 8, 2022

Fast error-free testing so far using SQLite, I will be testing with various players to see if there are any errors.

As soon as possible return with the results.

@crashzk
Copy link
Contributor

crashzk commented Jan 21, 2022

Can be merged, so far no errors for me using SQLite/MySQL.

I tested both with an existing database and with a clean database.

@Ferks-FK
Copy link
Author

Are you handling SQLite also? I think INSERT ... ON DUPLICATE KEY UPDATE and INSERT IGNORE are MySQL syntax. On SQLite there was INSERT OR IGNORE but I'm not current on these db concepts. Can you check if this works when SQLite is used?

According to @crashzk tests the plugin works well with MySQL and SQLite.
The merge can be done, I believe.

@kgns kgns changed the base branch from master to dev January 21, 2022 07:30
@crashzk
Copy link
Contributor

crashzk commented Apr 10, 2022

This PR has been closed, no longer needs to be merged? @kgns

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants