Saving/Loading data into/form the file
Hello everyone.
I am working on one mode, which has levels and user preferences. I would like to provide multiple ways for data saving/loading. Currently, I have SQL Lite and MySQL support. But I would like to include the option to be able to store data in the file locally. The data saving is happening on every level up and death. I am interested in using this and incorporating it to the Source Mode as a module. So do you think that it is a good idea to do this? PS: NBT is cool, there are multiple editors for it on the internet. |
Re: Saving/Loading data into/form the file
SQLite is a local file.
|
Re: Saving/Loading data into/form the file
Quote:
Would this make lag, because the files are read sequentially for each player? I've never messed around with the files as the databases. |
Re: Saving/Loading data into/form the file
It depends. How ofthen you save. How much data and so.
You could use KeyValues format file, so you don't need to create separate file for each player. https://sm.alliedmods.net/new-api/ke...s/ExportToFile Or you could store data in Cookies on client's side. https://sm.alliedmods.net/new-api/cl...etClientCookie https://sm.alliedmods.net/new-api/cl...tCookiesCached |
Re: Saving/Loading data into/form the file
Quote:
|
Re: Saving/Loading data into/form the file
lol, thank you.
So, what is actual identity binding for cookies based on? |
Re: Saving/Loading data into/form the file
Steam ID probably.
|
Re: Saving/Loading data into/form the file
I advise you to use clientprefs for preferences, and SQLite ( or MySQL if you want multi-server integration ) for levels ( EXP )
|
| All times are GMT -4. The time now is 23:36. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.