Ini_Module, Worst Plugin in VCMP

Started by Mötley, Oct 09, 2016, 02:05 PM

Previous topic - Next topic

Mötley

Okay so clearly the Ini module was the least taken care of plugin in VCMP And I am highly discouraging anyone from using it!


I will not go far into detail, But hear is a simple example

Quote[Motley]
Kills = 0
Deaths = 0
Joins = 307
Admin = true
Vip = true
This is the LU layout, Notice how clean this is? Notice the uppercase was not ignored.





This is The VCMP layout,.

Do you notice the differnce? This was the same exact layout I just never gave the player there bool for admin/vip
The Upercase in Player.Name was Ignored, This was not done in scripting, This was literally the exact same script
Quote[motley]
kills                          = 0
deaths                         = 0
joins                          = 4






Please refer to the other Ini plug-in unless the source code is released for the official plug-in for an better update, I personally do not trust this plug-in, It's ugly, And 'Might have many hidden flaws'


http://forum.vc-mp.org/?topic=3631.msg27407#msg27407





EK.IceFlake

The developers of this very plugin, too, have discouraged it.
Use MySQL.

Mötley


Thijn

I'm not sure what the point of this topic is. The INI plugin has been deprecated for a reason.

Mötley

I used to use Ini all of the time, Hear recently I got back to it after some work I was doin in LU, After noticing how the Ini plugin works hear I personally discourage it.

But I do encourage http://forum.vc-mp.org/?topic=3631.msg27407#msg27407

jWeb

If you're all so attached to using INI, this one seems to have built in INI functionality.

Assuming this test.ini file:
[test]
name=squirrel
age=19
ratio=2.3
active=false

[option]
max=99
count=322153

With code:
local document = SqIni.Document();
local result = document.LoadFile("test.ini");

if (!result.Valid)
{
    throw "cannot load ini file";
}

print(document.GetValue("test", "name", "unknown"));
print(document.GetValue("test", "n@me", "unknown"));

print(document.GetInteger("test", "age", 17));
print(document.GetInteger("test", "ag3", 42));

print(document.GetFloat("test", "ratio", 4.3));
print(document.GetFloat("test", "rtio", 1.34));

print(document.GetBoolean("test", "active", false));
print(document.GetBoolean("test", "act!ve", true));

print(document.GetInteger("option", "max", 0));
print(document.GetInteger("option", "count", 0));

document.SetValue("test", "name", "mikado");
document.SetInteger("option", "stage", 27);

result = document.SaveFile("test2.ini");

if (!result.Valid)
{
    throw "cannot to save ini file";
}

Outputs:
[USR] squirrel
[USR] unknown
[USR] 19
[USR] 42
[USR] 2.3
[USR] 1.34
[USR] false
[USR] true
[USR] 99
[USR] 322153

And results with test2.ini file:
[test]
name = mikado
age = 19
ratio = 2.3
active = false


[option]
max = 99
count = 322153
stage = 27

Everything seems to work fine, there are no bugs, and most features are available. Which means, that it's your fault for choosing the wrong tools to work with in the first place. Using deprecated software and expecting to work flawlessly.

NicusorN5

For me the INIParser works perfectly... :P

Radon


EightyVice

Quote from: NicusorN5 on Oct 10, 2016, 05:07 PMFor me the INIParser works perfectly... :P
Me too, iam from lovers of ini