Posts: 68
Threads: 5
Joined: Jul 2015
Posts: 1,773
Threads: 47
Joined: Jan 2015
Reputation:
0
Update v2.4.0:
- Code optimized a bit
- Fixed auto file creation when using "Get" function
Posts: 68
Threads: 5
Joined: Jul 2015
It's still creating file, but now without any values.
++
Line 347
warning 202: number of arguments does not match definition ;
new instance = INI_OpenFileInstance(file, "dini_Set");
and where is " INI_StripLine "
Posts: 1,773
Threads: 47
Joined: Jan 2015
Reputation:
0
Update v2.4.1:
- "fexist" check added in "Get" functions to resist auto file creation
- Fixed "argument type mismatch" for "Set" functions
@JokeyL: INI_StripLine is done in "INI_OpenFileInstance", it's not used as a function but raw code as it's only used once in a call.
Posts: 68
Threads: 5
Joined: Jul 2015
Posts: 68
Threads: 5
Joined: Jul 2015
It's faster only 60-80 ms. But it still better than normal dini.
Posts: 68
Threads: 5
Joined: Jul 2015
LOL my bad i'm sory. I tested with your code:
Код:
new s, e;
s = GetTickCount();
for (new i; i < 100000; i++)
{
dini_Get("Test1.ini", "Set1");
dini_IntSet("Test1.ini", "Set2", 255);
dini_Int("Test1.ini", "Set2");
dini_Float("Test1.ini", "Set3");
dini_Timeout("Test1.ini");
}
e = GetTickCount();
printf("%i ms", e-s);
But i didn't change include from dini to gini XD
dini: 6383 ms
gini: 120 ms
Posts: 68
Threads: 5
Joined: Jul 2015
Hmm i found next bug...
OnPlayerDeath: playerInfo[killerid][Kills] += 1;
Load: playerInfo[playerid][Kills] = dini_Int(path, "pKills");
Save: dini_IntSet(path, "pKills", playerInfo[playerid][Kills]);
And it works okay. File looks: pKills=1
But it's not resaving(not save again)
If you load your stats, and save with another value, e.g: playerInfo[killerid][Kills] = 100; and save this, file doesn't update.
Sorry for my English
Posts: 68
Threads: 5
Joined: Jul 2015
But it not overwrite for Tidoos and Tidoos111 for different action.
Posts: 68
Threads: 5
Joined: Jul 2015
29.12.2016, 12:45
(
Последний раз редактировалось JokeyL; 08.01.2017 в 15:58.
)
[---]
Posts: 68
Threads: 5
Joined: Jul 2015
Loool Gammix check this; If 2 players create account in the same time .ini file write values only for 1 player.
I tested it two times, it's bug.
Posts: 68
Threads: 5
Joined: Jul 2015
Gammix, really fix this bug. Example if you use 2x dini_IntSet at the same time its not overwrite.
Look:
In file:
myValue=1
CMD:resave ;
dini_IntSet(player1, myValue, 0);
dini_IntSet(player2, myValue, 0);
= No effect.