Posts: 843
Threads: 61
Joined: Feb 2013
Reputation:
0
Hey guys. I have few questions about enums. Is it okay if I have lot of enums because I have around 220 enums which are all player's stats and I don't want my server to be laggy. And also, is it a smart idea to beside files for player's stats use files to store vehicle's stats for each player. My enum for PlayerInfo has vModel, vColor1, vColor2 and so on, but would be a good idea to make system which saves player's vehicles to different file, and loads it into different enum? Thanks!
-Best regards, Dominik
Posts: 188
Threads: 61
Joined: Nov 2012
Your server won't begin lagging of it, dont worry, I got like over 200 enums in my script and nothing is wrong with that, also that thing with the vehicle's stats, dont worry about that either, so yes, it would be an good idea.
- Yours, LyNet
Posts: 578
Threads: 56
Joined: Sep 2013
Reputation:
0
As far as my knowledge goes... I dont think having so many enums is a bad thing, to make things more nicer and better to find you could make seperate data base files or a new folder with all the vehicle files in it (depending what you use for saving, you could use my filterscript for SQLite as a starting base).
I hope I helped you out and good luck!
Posts: 11,827
Threads: 33
Joined: Dec 2011
Reputation:
0
I assume you meant 220 indexes of enums and not 220 enums instead.
I used to use an enum for the player's data as well but not anymore. I can now use char whenever it's possible and reduce the size!
Well, that depends on what you use. For example, I guess y_ini would be fine but some other file systems not (since they're slow). Though, I'd go for SQL.
Posts: 843
Threads: 61
Joined: Feb 2013
Reputation:
0
thanks guys for fast reply! I appreciate it. Voxel, I will try to do something with your Tutorial about SQLite, but once I learn SQL.
Can anyone else say something about enums? I just want to make sure that I'm doing a good thing with having lot of enums.
EDIT: yeah Konstantinos, I meant 220 indexes. 220 enums would be too much I think. Can you show me some example of using char for stats, nothing too big.