Oldskool
#1

Since it's been 2 months since my last activity, and the forums now have the seperated discussion and help sections (finally), I'm taking advantage of it (I'M BORED)

So uhhm, I was wondering if there are still people using dini and dcmd instead of mysql and zcmd... or if people are still making commands in strcmp <(^-^)> I've always used dini and dcmd, and I still use it, and whenever I script I will use it. How bout y'all?
Reply
#2

Damn that was quick, yeah I've studied the define line, yet I count them as 2 different things, as you use them differently. P.S. another reason I still use dcmd/dini is because I just don't care about performance, it's like me and games, idk bout graphics, more bout gameplay.. (just to give u an idea)
Reply
#3

It has nothing to do with the gameplay, the fact that Dini takes seconds instead of miliseconds to get some data from a file is just showing how outdated and bad it is to use right now. You are just ignorant if you don't care about performance. (It will bite you in the ass one day).
Reply
#4

Quote:
Originally Posted by playbox12
View Post
You are just ignorant
quote
Reply
#5

Quote:
Originally Posted by Mike_Peterson
View Post
Damn that was quick, yeah I've studied the define line, yet I count them as 2 different things, as you use them differently. P.S. another reason I still use dcmd/dini is because I just don't care about performance, it's like me and games, idk bout graphics, more bout gameplay.. (just to give u an idea)
Yeah, I bet it feels awesome playing on your server and then suddenly everything stops when your script iterates through a number of files and reads data from them, on each function call re-opening the file and closing it again. Hurr durr.

(sorry for the dipshit attitude though)
Reply
#6

As Y_Less said, using dcmd and dini is not oldscool, its an inefficient way of scripting. Anyway, if you care what I call oldschool, these old roleplay servers which script-wisely had almost no systems, but somewhy where very interesting and attractive.
Reply
#7

Now the great point of this is, that I never will and never have to script a server ^^ and now I think about it, i shud've changed the title.. :P oh well, doesn't matter.. it's all discussion.. dini/dcmd might be inefficient, they're trusted ways of scripting for me, that's the main reason.
Reply
#8

In that case I wouldn't take a scripting lesson from you.
Reply
#9

Quote:
Originally Posted by Mike_Peterson
View Post
Now the great point of this is, that I never will and never have to script a server ^^ and now I think about it, i shud've changed the title.. :P oh well, doesn't matter.. it's all discussion.. dini/dcmd might be inefficient, they're trusted ways of scripting for me, that's the main reason.
But you're teaching people how to script and you're advising them to use bad methods.

Stop being lazy and learn the new methods, zcmd actually works out to be a lot more simple to use and you can do a lot more with the new file function includes (like y_ini) than you could with dini.
Reply
#10

You can never compare dini with MySQL.
Most of the reasons of usage are the same, but they are completly diferent functions.
Reply
#11

Quote:
Originally Posted by FireCat
Посмотреть сообщение
You can never compare dini with MySQL.
Most of the reasons of usage are the same, but they are completly diferent functions.
That is how you CAN compare the two. They both save the information you want to save. They both load the information you want to load. Even with the differences, those simplified reasons are more than enough.

Anyway, yes, there is still people using strcmp. There always will be until it's completely faded out (which most likely wont happen unless the default system is changed to something like zcmd, ycmd, etc. Yes, Dini is outdated, it's slower than fread/fwrite however it also gives you better looking files that are easier to navigate. I still use dini from time to time because I don't feel like setting up an SQLite DB or MySQL DB most of the time for simple things. Though if it's a small file I'd just use fread/fwrite. Anyway thought I'd throw my opinion and answer out there.
Reply
#12

You know there are other, better, ini systems right?
Reply
#13

I still use strcmp for one or two things, I wrote a CallLocalFunction based command system (that's how ZCMD works) for standard commands but I have some "dynamic" sort of commands that change during runtime, I couldn't figure out a way to incorporate public functions to do that so I just used a simple loop+strcmp (It loops about 50-60 times)

It's for teleports, so I have an array of coordinates and commands, you type for instance "/ls" it loops the array, checks each string and if it matches it teleports you to the right place.

Call me lazy, but I didn't really want to write (or write a function to write) 50-60 command functions for teleports!


As for files, just listen to everyone else, and don't offer scripting help if you have to ask about things like this!
Reply
#14

For me, DCMD and DINI are hard, I find Y_INI, ZCMD, YCMD and those kind of modern codes way better, but sometimes I get confused from Y_INI .. Either it mixes data or it's just me sucking in scripting lol.
Reply
#15

Well 90% scripts that are on Balkan servers or made/edited by someone from Balkan are using dcmd or strcmp and for saving mostly its a saving system made by Fear for GF (Yes they are still using GF or GF edits)
Reply
#16

improved dini (by me) and strcmp commands.
Reply
#17

My benchmarks say that basically strcmp and dini are good enough for me. Dini is bad, but it doesn't take even a second to do it's job (mostly just loading & saving stats)

I still don't "believe" in command processors, that's just how my mind works :P
Reply
#18

Dini is really inefficient, and even though you only compare one file open, close, write, and whatnot, it's only ONE file.

Large servers obviously don't use it because hundreds of files being opened, closed, written, and read at the same time inefficiently is defiantly not the way to go.
Reply
#19

Quote:
Originally Posted by [FSaF]Jarno
Посмотреть сообщение
My benchmarks say that basically strcmp and dini are good enough for me. Dini is bad, but it doesn't take even a second to do it's job (mostly just loading & saving stats)

I still don't "believe" in command processors, that's just how my mind works :P
You think a little less than a second is not bad? Well consider the following scenario that'll likely happen, for the sake of simplicity, I'll just picture the following;

Player A chases Player B in a car chase, player C shoots at player B from player A's car. Every time your script loads something using dini file systems the server is halted for the duration, both player A and C will not see player B update and will probably drive off the road because it looks like the player did now imagine having a full 50 slot server.

Therefore execution speed is one of the most important aspects in a SA-MP server, trying to prove otherwise is ignorant. Now for the commands bit, it's less important depending on the amount of commands and size it will not halt your server (atleast from my experience). However the performance you gain by using an up to date system like ZCMD or YCMD is significant and I just cannot think of a reason not do it (other than Southclaw's reason).

Why would you not update? Lazyness? If you aren't always looking to better your programming skills I wouldn't ever bother pursueing a future in it. Really, you have to see the fun in reading up new techniques and learning otherwise the industry is just not for you.
Reply
#20

Wow, I've thought about all of that, but have never managed to stick it into one post as simple as that. Just awesome, playbox12, or should I say, ugh "REPPED!11".

I was also giving some thought to Southclaw's idea, but once I realized he may be using it for "dynamic" teleports that can also be modified during runtime, my idea kinda went sour. If possible, you could work out a compiler macro to create these commands for you, e.g.
pawn Код:
ADD_TELEPORT(center, 0.0, 0.0, 0.0);
And if you want to dynamically (dis)allow the usage of the command, use an array.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)