Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! -
Gammix - 12.06.2017
Update dini2.inc v2.6:
- Fixed index misplacing bug
- Fixed double value adding bug
- String hashing as been removed and normal loop has been resumed back!
- It is really fast still, benchmarks has been updated.
If you find any bugs, post them here
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! -
JokeyL - 12.06.2017
error 004: function "dini_GetFileIndex" is not implemented
what's wrong?
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! -
Gammix - 12.06.2017
Quote:
Originally Posted by JokeyL
error 004: function "dini_GetFileIndex" is not implemented
what's wrong?
|
Fixed, it was
static instead of
stock!
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! -
JokeyL - 12.06.2017
error 017: undefined symbol "empty"
error 035: argument type mismatch (argument 3) 272, 306:
format(diniFileValues[index][i], DINI_MAX_FIELD_VALUE, value);
format(diniFileValues[index][i], DINI_MAX_FIELD_VALUE, value);
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! -
iLearner - 12.06.2017
Quote:
Originally Posted by iLearner
Can you add ignore case in dini_exists?
|
....
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! -
Gammix - 13.06.2017
Quote:
Originally Posted by JokeyL
error 017: undefined symbol "empty"
error 035: argument type mismatch (argument 3) 272, 306:
format(diniFileValues[index][i], DINI_MAX_FIELD_VALUE, value);
format(diniFileValues[index][i], DINI_MAX_FIELD_VALUE, value);
|
Made a quick update from my phone, try it out and let me know.
Quote:
Originally Posted by iLearner
....
|
I can make it like so but it would be highly inefficient since you have to loop through alot of stuff. There are some other smart ways, like creating all files in lowercase or uppercase.
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! -
Dalayma - 13.06.2017
Hi Gammix
fix it
line 272 GitHub
PHP код:
valstr(diniFileValues[index], value);
valstr(diniFileValues[index]
[i], value);
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! -
JokeyL - 13.06.2017
I don't know why, but when i save player moneys:
dini_IntSet(string, "pMoneys", GetPlayerMoney(playerid));
then value in file is
-1030672120
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! -
Yousha - 06.07.2017
I think this should be
iDini, not Dini
2... because there is no API change, right?
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! -
iLearner - 21.08.2017
Quote:
Originally Posted by Gammix
Made a quick update from my phone, try it out and let me know.
I can make it like so but it would be highly inefficient since you have to loop through alot of stuff. There are some other smart ways, like creating all files in lowercase or uppercase.
|
I really need a way to ignore case cause this is being highly abused at my server.
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! -
Belengher - 05.10.2017
How convert this?
Quote:
public SaveAccounts()
{
new respect, string[128];
foreach(new i : Player)
{
if(Logged[i])
{
format(string, sizeof(string), "Accounts/%s.ini", LinuxName[i]);
new File: account = fopen(string, io_write);
if(account)
{
format(string, sizeof(string), "Key=%s\n", PlayerInfo[i][pKey]); dini_Set(account, string);
format(string, sizeof(string), "LoserLevel=%d\n", PlayerInfo[i][pLoserLevel]); dini_Set(account, string);
format(string, sizeof(string), "Name=%s\n", PlayerInfo[i][pName]); dini_Set(account, string);
format(string, sizeof(string), "Level=%d\n", PlayerInfo[i][pLevel]); dini_Set(account, string);
format(string, sizeof(string), "AdminLevel=%d\n", PlayerInfo[i][pAdmin]); dini_Set(account, string);
format(string, sizeof(string), "DonateRank=%d\n", PlayerInfo[i][pPremium]); dini_Set(account, string);
format(string, sizeof(string), "UpgradePoints=%d\n", PlayerInfo[i][pUpPoints]); dini_Set(account, string);
format(string, sizeof(string), "ConnectedTime=%d\n", PlayerInfo[i][pHours]); dini_Set(account, string);
format(string, sizeof(string), "Registered=%d\n", PlayerInfo[i][pReg]); dini_Set(account, string);
format(string, sizeof(string), "Sex=%d\n", PlayerInfo[i][pSex]); dini_Set(account, string);
format(string, sizeof(string), "Age=%d\n", PlayerInfo[i][pAge]); dini_Set(account, string);
format(string, sizeof(string), "Origin=%s\n", PlayerInfo[i][pOrigin]); dini_Set(account, string);
format(string, sizeof(string), "SAO=%d\n", PlayerInfo[i][pFactionPayday]); dini_Set(account, string);
format(string, sizeof(string), "Muted=%d\n", PlayerInfo[i][pMuted]); dini_Set(account, string);
format(string, sizeof(string), "Respect=%d\n", PlayerInfo[i][pExp]); dini_Set(account, string);
format(string, sizeof(string), "Money=%d\n", PlayerInfo[i][pCash]); dini_Set(account, string);
format(string, sizeof(string), "Bank=%d\n", PlayerInfo[i][pAccount]); dini_Set(account, string);
format(string, sizeof(string), "Crimes=%d\n", PlayerInfo[i][pCrimes]); dini_Set(account, string);
format(string, sizeof(string), "Kills=%d\n", PlayerInfo[i][pKills]); dini_Set(account, string);
format(string, sizeof(string), "Deaths=%d\n", PlayerInfo[i][pDeaths]); dini_Set(account, string);
etc etc etc...
|
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! -
Gammix - 05.10.2017
Quote:
Originally Posted by JokeyL
I don't know why, but when i save player moneys:
dini_IntSet(string, "pMoneys", GetPlayerMoney(playerid));
then value in file is -1030672120
|
This should be fixed after the minor change i did from a post previous to yours.
Quote:
Originally Posted by Yousha
I think this should be iDini, not Dini2... because there is no API change, right?
|
Yea maybe, but i like dini2 a better name!
Quote:
Originally Posted by Belengher
How convert this?
|
You don't need to convert old dini or anything. The syntax remains the same but the algorithm/source code is different.
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! -
JokeyL - 05.10.2017
Yep, now it's working, but there is still little problem... When player statistics are saved, then in file appear unused entries, f.e;; pAchievement= or pAchievement1=0
In previously versions there was no such problem. So it has to be?
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! -
Gammix - 06.10.2017
Update v2.8:
- Improved code/Rewritten code
- New API available for better performance (old one is still there for conversion)
- Increased performance
@JokeyL: Test this version out and let me know the bugs.
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! -
JokeyL - 08.10.2017
Yes! Now it's work perfect!!
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! -
Marllun - 21.11.2017
It makes a dof2 speed tester and dini
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! -
Usmanmemon - 21.11.2017
how i can replace file name how i can?
example: User name is 'Usman' change to 'Memon'.
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! -
Gammix - 21.11.2017
^
PHP код:
DINI_fcopytextfile("original file", "new name");
dini_Remove("original file");
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! -
Usmanmemon - 21.11.2017
Quote:
Originally Posted by Gammix
^
PHP код:
DINI_fcopytextfile("original file", "new name");
dini_Remove("original file");
|
Thanks but it's not working for me i try to login the pass always wrong.
Re: dini2.inc - Improved dini file processor with amazing benchmarks (aka. gini)! -
Gammix - 01.12.2017
Quote:
Originally Posted by Usmanmemon
Thanks but it's not working for me i try to login the pass always wrong.
|
Then there's most probably problem in your hashing algorithm or the way you store your hashed password with dini.
By the way, renaming file has no relevance to this?!