View Single Post
Author Message
aexi0n
AlliedModders Donor
Join Date: Nov 2014
Location: bhop_deluxe
Old 12-27-2015 , 19:25   Pro's vs. Con's of storing player data in variables?
Reply With Quote #1

So recently I made the change to switch from clearing all variables on disconnect, and reloading data on connect, thus refreshing all player data every map change. This was great in terms of never mixing up/losing data, but the queries held up the server constantly. So now I've made it so player data is only loaded on their first connect, and not cleared unless they disconnect, (not from map change).

However after making this dhange I was wondering if there were some possible ways that the data could get mixed around or lost? I've had a few players since the change explain their level was switched to someone else's data. I've reviewed the code where levels are saved, and it checks the steamid right before the update query, so I don't believe it could be an error in there. I'm thinking it might be switched with another client on mapchange somehow. Is this possible?
aexi0n is offline