SA-MP Forums Archive
DINI TO Y_INI - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: DINI TO Y_INI (/showthread.php?tid=623878)



DINI TO Y_INI - iSoaD - 07.12.2016

hello brothers, please can help me ? i'm need convert dini to y_ini

PHP код:
    if(!dini_Exists(file)) dini_Create(file);
    
dini_IntSet(file"Slot0"InvInfo[playerid][iSlot][0]); 
PHP код:

    format
(filesizeof(file), "Inventory/%s.ini"GetName(playerid));
    
InvInfo[playerid][iSlot][0] = dini_Int(file,"Slot0");
    
InvInfo[playerid][iSlot][1] = dini_Int(file,"Slot1"); 



Re: DINI TO Y_INI - Luis- - 07.12.2016

Why not just use MySQL? It's a whole lot better than Y_INI. And better for you to learn it as well.


Re: DINI TO Y_INI - iSoaD - 07.12.2016

Quote:
Originally Posted by Luis-
Посмотреть сообщение
Why not just use MySQL? It's a whole lot better than Y_INI. And better for you to learn it as well.
I prefer y_ini I do not get along with mysql just with SQLite


Re: DINI TO Y_INI - Gammix - 07.12.2016

Stick with your dini but upgrade to dini2 instead.


Re: DINI TO Y_INI - GoldenLion - 07.12.2016

Well if you are using the original dini and you want something faster then you can simply get dini2 by Gammix. It's a lot faster, the creator also says it's faster than y_ini, but ****** says the benchmarks are flawed, I don't know anything, but still it's fast, I've been using this for a long time and it's doing well and I'm satisfied. Also dini is a little bit easier to use in my opinion as well. Plus if you are going to use dini2, then you won't need to change any functions. I will need to move to MySQL soon even though I like dini2.

EDIT: Gammix was faster lol.


Re: DINI TO Y_INI - Dignity - 07.12.2016

Quote:
Originally Posted by iSoaD
Посмотреть сообщение
I prefer y_ini I do not get along with mysql just with SQLite
Don't get along as in.. you looked at some snippets and decided it would be too hard for you?

SQLite is more difficult than MySQL imo and you're essentially doing the same thing anyway so I don't see the point in shrugging it off. Why not start with a better framework that will benefit you not just in pawn but in other languages as well?

Y_INI's way of loading is essentially the same as MySQL's, minus the queries.