WriteIni compared to SQ_Lite

Started by Mötley, Apr 12, 2016, 03:58 PM

Previous topic - Next topic

Mötley

So I had time to personally run test with both of these.

WriteIni can be really fast, Yet extremely helpful but can cause Nightmares in your script if not careful. I have always had to use player looping methods and Many array values and with arrays making [Player.ID] = Player.Name when saving a players Account, There is so much I could get into with WriteIni methods and options that I prefer to not go into that much"Not hear to teach Ini"


SQ_Lite, Sq-lite can be enormously fast, Yet still with the same nightmares with WriteIni,. SQ_Lite you always have to add to the the players database and can be Really annoying compared to just add another WriteIni to the saving of a player.
I have noticed that SQ_Lite is very fast in the aspect of how you plan to use it. The obvious is only Death-matches/Accounting is really its only true good usage. But can be developed into other stuff like position database etc. But adding a lot to one database can be crucial and unprofessional sometimes. More unprofessional if you have many databases,.

WriteIni can be Extremly fast and can keep up with Sq_Lite "!!But you have got to know what you are doing, One screw up could slow down the server processes!!".

With SQ_lite is basically the same, Other than Always adding on to a database "Can be slow and aggravating compared to ini being capable of adding a lot in 5 minutes example: adding a players pos to a database,

local pos = player.Pos

pos.x
pos.y
pos.z

Then giving the player these positions on His/Her/It's next spawn.
Stuff like this that is so simple in Ini and extremely fast to add
With SQ_Lite you might want to make coffee and over look your
database as it can be really slow and can be a time waster in SQ_Lite,
You may mess up in the database and need to keep backups before
attempting to add onto one database. Now my usage of SQ_Lite could
 be different than others and i could be slower that others.   
FIGURED ID PUT MY INPUT IN
~I suggest that new scripter's or scriptwriters in general joining VC:MP to use this method
as it is great practice. A bit of a real slow down for myself compared to knocking out a lot in one day.
Somethings I find myself to prefer to not get into/add due to the irritating issues.

Thijn

So you're saying WriteIni is better because you fucked a SQLite database before?
I don't think comparing the setup is fair to judge on usage. Yes, sqlite might be harder to setup since you'd have to create a database and make tables. But that can also be done using GUI tools, of which there are plenty.

Mötley

#2
I never said I have F'D a Database I may of sounded wrong and what was intended was script side. Its impossible to mess up a database unless something in the scripting side causes something to not work correctly in the database.

I never said INI is better or SQ_LITE,

And Gui tools? I just add onto the browser and add its functions in the scripts. I have never really had any issues so far with Sq_Lite its just a slow process to build a server.

Vortex has been teaching me a lot about Sq_Lite,.

I see that SQ_Lite can be more professional to build over a INI server

KAKAN

oh no

Mötley

Quote from: KAKAN on Apr 12, 2016, 06:17 PMWhat about MySQL :P?

I plan to learn that soon and convert over to MySQL

.

Quote from: Mr_Motley on Apr 12, 2016, 06:54 PMI plan to learn that soon and convert over to MySQL

Well, let me get you in on a little secret. If its advertised as a database and contains 'SQL' in the name. Chances are you will have the same impression that you had with SQLite. And if you couldn't handle SQLite which is the most portable database. Then I'd be willing to make a bet that MySQL is going to be waaay out of your league.
.

Thijn

In that case I didn't understand your post :P
I still prefer SQLite over INIs because you can generate lost of interesting lists with it, for example top 10 killer or deaths etc.
With INIs you might as well shoot yourself.

Mötley

Well Since we are on off-Topic.
@Thijn
[LU Question] does it sound dumb to use a timer in client scripts,

Then do call server function to save the players data? as I only prefer to save the data on player part, but if the server or client crashes the data does not save. The Reason why I would like to attempt this method is due to possible lagging of the server. I rather have possible lag on the clients (players) than to lag the entire server. But there is a possibility of data usage (saving data) at random times, causing the server to still possibly lag. This was just an idea I had and have not adventured with as I would rather ask someone eles on there opinion,.

And yes I believe you with shooting yourself with using INI but I will say INI can be a lot of fun.

And S.L.C @. I know xD I have no plans to upgrade until in three years when i seem to master SQ_Lite

Thijn

Yes it sounds dumb :) For something so critical as saving data you don't want to rely on the client. You want the server responsible for that.
And it's not the timer that's making the lag, it's saving the data. So it wouldn't matter to run the timer on the client, you'd still have to do the saving server-side.

Mötley

Okay :) Just never seen someone do it. I am happy i did not waste my time with that Thanks.

DizzasTeR

Ahem, don't create such scripts that can cause crashes and you can always save the data at on player part.

KAKAN

Quote from: Doom_Kill3R on Apr 13, 2016, 03:13 AMAhem, don't create such scripts that can cause crashes and you can always save the data at on player part.
Then the webstats would not get updated though.
oh no

DizzasTeR

Why wouldn't it get updated? It will.

Mötley

#13
That was only a idea that i thought sounded interesting

The concept that was in my mind for saving with client rather than server side :This was a idea to save the players data incase the server crashes or the client crashes and the data does not save as I  noticed if i do not save the data at some point and the client crashes or the server crashes then the player basically never played as player-part will not become a function. So instead of saving the players data server side what happens if i use client scripts. Then the idea came that maybe instead of lagging the entire server maybe I could possibly just lag the client instead of the host and server as this makes more sense. I prefer to only save on player part, as its possible to lag the server but less possible to lag the client.

And what i think KAKAN is speaking of is the web stats updating as the player plays compared to what if the player played for one hour? then all of the players stats do not update for and entire hour

KAKAN

#14
Quote from: Doom_Kill3R on Apr 13, 2016, 07:21 AMWhy wouldn't it get updated? It will.
Suppose, I made 900 kills, before that I had 200 kills. The webstats will still show 200, but the ingame will show 1100. Because it's not yet updated on the DB.
The only possible way I can think of is to use the RCON plugin made by @Kirollos
With that, we can keep a connection with the server and the webstats, then when a user goes to the webstats, he can see the online players as well as updated stats.
oh no