muukis / l4dstats

SourceMod plugin (Custom Player Stats) for collecting statistics and creating player ranking in Left 4 Dead and Left 4 Dead 2 games
https://forums.alliedmods.net/showthread.php?t=115965
17 stars 9 forks source link

Loses connection to DB issue #17

Open HairyMilkshakes opened 6 years ago

HairyMilkshakes commented 6 years ago

Hi, not sure what the cause is right now because /log/ doesn't throw any errors. Here's a description:

After a while the plugin/db loses connection to the game. So while the plugin loads fine and I am able to use !rank and !rankmenu to check my current stats, no additional points are awarded for any type of functions.

When I check the online webstates page, it's also showing that nobody is online when the server actually is populated. Not sure what the problem is.

muukis commented 6 years ago

I will try to find the reason for this. Thanks for reporting!

HairyMilkshakes commented 6 years ago

Also, is there a particular reason why stats aren't tracked on easy difficulty? Wouldn't it make more sense to have a penalty multiplier applied? For example, (0.5x on easy, 1x on normal, 1.25x on advanced, 1.5x on expert).

I thought my DB was losing connection sometimes when in fact it was just not activated when players choose easy difficulty.

muukis commented 6 years ago

I don't remember what was the reason for not recording stats on easy difficulty. I am not sure how much effort would it require for adding easy difficulty stats recording. However, that could very well be the reason for the connection issue you were having? Please report back if you find it otherwise, thanks!

HairyMilkshakes commented 6 years ago

More info on the disconnect "bug" - on easy difficulty, stats aren't recorded and there's no cvar to change in the .cfg file.

This becomes a problem once players leave the server and the map rotation resets to default. For example, when someone is playing in easy mode, then stats aren't recorded. When they quit in the middle of the game, the difficulty doesn't revert back to normal (or whatever the default is). Then, a new lobby of players join and starts a new map/game in normal mode. Stats in this case still doesn't record.