Raised This Month: $32 Target: $400
 8% 

[L4D2]Adding Databases into Point System


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dtor
Member
Join Date: Nov 2015
Old 11-03-2017 , 17:06   [L4D2]Adding Databases into Point System
Reply With Quote #1

There are someone who posted this idea before , but no one respond to him so I made another thread here
Source link : https://forums.alliedmods.net/showthread.php?t=134113
McFluffy is offline for so long , despite every message I have sent to him ( email , skype , etc ... )
The darn situation start with this ideas is when I was playing in my own little server with my friend , my game got crashed and I have to rejoin the server , the server is full and until I managed to join. What I watched is all my points is gone . The rage came and later so , I'm trying to code .... by myself . But the lack of knowledge and skill came a total hell. The progress didn't go much. So I decided to post it here.
Thanks.
Dtor is offline
Mr.Freeman
Senior Member
Join Date: Nov 2013
Location: Canada
Old 11-05-2017 , 11:17   Re: [L4D2]Adding Databases into Point System
Reply With Quote #2

I only reviewed the code briefly however it doesnt appear to be saving the data in MYSQL meaning that on a server crash / restart the data would be wiped thus giving you 0 points again.
__________________
Feel Free to PM me about any questions, I'll do my best to help
Mr.Freeman is offline
Skyy
AlliedModders Donor
Join Date: Jan 2010
Location: Toronto, Canada
Old 11-05-2017 , 22:58   Re: [L4D2]Adding Databases into Point System
Reply With Quote #3

Hello;

If all you'd like to do is remember points on disconnect, a database is not necessary - using a simple array, you can store both their steam id - and the points they had - on disconnect, and simply return the points to them if they rejoin in the same round; when the round ends, you simply clear the array. As an array, you can store as many users who disconnect. I would only recommend actual database usage for much more intensive uses.
Skyy is offline
Dtor
Member
Join Date: Nov 2015
Old 12-13-2017 , 20:04   Re: [L4D2]Adding Databases into Point System
Reply With Quote #4

Quote:
Originally Posted by Mr.Freeman View Post
I only reviewed the code briefly however it doesnt appear to be saving the data in MYSQL meaning that on a server crash / restart the data would be wiped thus giving you 0 points again.
Yes , and sometimes the server crash without throw in any error , the crash quite rare but mostly in late game. Sometimes it just kills the fun sooner than i though.

Quote:
Originally Posted by Skyy View Post
Hello;

If all you'd like to do is remember points on disconnect, a database is not necessary - using a simple array, you can store both their steam id - and the points they had - on disconnect, and simply return the points to them if they rejoin in the same round; when the round ends, you simply clear the array. As an array, you can store as many users who disconnect. I would only recommend actual database usage for much more intensive uses.
Hi Skyy
All I like is the server can save points to database because sometimes it crashed and end all the fun , I did view all the code from your rpg referring to points and database as well as other dev , although it won't have me much.

Last edited by Dtor; 12-13-2017 at 20:06.
Dtor is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:08.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode