safra36 / PlayerSkin

A simple playerskin manager plugin with useful features
20 stars 5 forks source link

MySQL can't connect #19

Open mrrockist opened 3 years ago

mrrockist commented 3 years ago

How to use MySQL to connect datebase?

safra36 commented 3 years ago

You should just try MYSQL driver and set your mysql data in database.cfg, not a plugin related issue

mrrockist commented 3 years ago

like this? "PlayerSkins" { "driver" "mysql" "host" "127.0.0.1" "database" "sourcemod" "user" "root" "pass" "*****" } It'not working.

safra36 commented 3 years ago

do you have a connection issue or data is not being added to your database? do you get the console message that the database is connected?

mrrockist commented 3 years ago

L 01/24/2021 - 12:17:09: [SM] Exception reported: Current result set has no fetched rows L 01/24/2021 - 12:17:09: [SM] Blaming: PlayerSkin.smx L 01/24/2021 - 12:17:09: [SM] Call stack trace: L 01/24/2021 - 12:17:09: [SM] [0] SQL_FetchString L 01/24/2021 - 12:17:09: [SM] [1] Line 1360, G:\SteamLibrary\steamapps\common\Counter-Strike Global Offensive\sourcemod\addons\sourcemod\scripting\PlayerSkin¸sp::IsUserWithSkins L 01/24/2021 - 12:17:09: [SM] [2] Line 131, G:\SteamLibrary\steamapps\common\Counter-Strike Global Offensive\sourcemod\addons\sourcemod\scripting\PlayerSkin¸sp::PlayerSpawn

log is here

safra36 commented 3 years ago

This does not mean that there is a connection issue, my best guess is that this indicates that your user does not have a saved skin so there is no row for your user on the database. I'll need more info on how to reproduce this error log any tips?

mrrockist commented 3 years ago

I used latest version to compile,data can be written into MySQL correctly. But when you try to suicide , and respawn,then change back to default skin. If you use !skins the error log will come out,like I said before. This is not the case with the old version by Sqlite(5.0.1 (Build 4)), but the old version cannot read&write MySQL(and same error log)