PDA

View Full Version : [Include] [INC] SII 2.0.6 - Fast cache based INI Reader/Writer


[DRuG]Slick
18/12/2008, 03:45 AM
Slick's INI Include 2.0.6


I have decided to release an include of mine for reading/writing INI files. I wrote it some time ago after want of a faster solution than DINI. Rather than change to DJSON I still wanted to use INI files because they are simple and clean, and so this script was born.

Slick's INI Include works using a complete cache system that does all its manipulation in memory. When a file is opened, its transferred to memory where data can be read/written, deleted, etc and then wrote all back to the file when finished. Rather than opening/parsing/closing a file each time you want to access a entry. This means it is very fast.


Features

Speed - Thanks to the cache system, mass amounts of data can be read/written all in one go.
Security - Many tests have been performed to ensure the script is crash-proof in all situations.
Customization - Easily change the amount of supported string sizes, lines and more.
Compatibility - Backwards compatible with DINI files, follows the INI standard http://en.wikipedia.org/wiki/INI_file
Comments - Manually edit your files and place helpful comments (Semicolons ; indicate the start of a comment)
Easy - Even your mother could use this!



Benchmark
I performed some benchmarks using SII, DINI and the raw file functions. There were two tests performed over a number of times with the average results shown here. The first test involved creating a file, writing a key with a value and then removing the file. The second test did the same thing but with a mass number of entries being written which is where other solutions like DINI really begin to show their dull colours.
http://img442.imageshack.us/img442/6605/graphis9.gif
As you can see, SII is almost as fast as using the raw file functions on their own, around a 5 millisecond difference to be exact.


Tutorial
Basic player accounts with SII and DCMD :D
#include <a_samp>
#include <SII> // Include SII.inc

#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1

new player_name[MAX_PLAYERS][MAX_PLAYER_NAME];
new bool: player_loggedin[MAX_PLAYERS];

main()
{

}

public OnGameModeInit()
{
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}

public OnPlayerConnect(playerid)
{
GetPlayerName(playerid, player_name[playerid], MAX_PLAYER_NAME);
return 1;
}

public OnPlayerDisconnect(playerid)
{
player_loggedin[playerid] = false;
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(register, 8, cmdtext);
dcmd(login, 5, cmdtext);
return 0;
}

dcmd_register(playerid, params[])
{
if (player_loggedin[playerid]) // Player is already registered and logged in
{
SendClientMessage(playerid, 0x0040FFAA, "You are already registered and logged in.");
return 1;
}
else if (!params[0]) // No password was specified
{
SendClientMessage(playerid, 0x0040FFAA, "Usage: /register [password]");
return 1;
}
else if (INI_Open("Users.ini")) // Try open "Users.ini"
{
new password[128];
if (INI_ReadString(password, player_name[playerid], MAX_PLAYER_NAME)) // Is player already registered?
{
SendClientMessage(playerid, 0x0040FFAA, "You are already registred, please /login.");
}
else // Register player
{
INI_WriteString(player_name[playerid], params);
SendClientMessage(playerid, 0x0040FFAA, "Registration successful.");
}
INI_Save(); // Save all the data we have written to "Users.ini"
INI_Close(); // Remember to close open files when finished
return 1;
}
SendClientMessage(playerid, 0x0040FFAA, "Registration failed."); // There was an error opening "Users.ini"
return 1;
}

dcmd_login(playerid, params[])
{
if (player_loggedin[playerid]) // Player is already logged in
{
SendClientMessage(playerid, 0x0040FFAA, "You are already logged in.");
return 1;
}
else if (!params[0]) // No password was specified
{
SendClientMessage(playerid, 0x0040FFAA, "Usage: /login [password]");
return 1;
}
else if (INI_Open("Users.ini")) // Try open "Users.ini"
{
new password[128];
if (INI_ReadString(password, player_name[playerid], MAX_PLAYER_NAME)) // Read players data (if it exists)
{
if (!strcmp(password, params, false)) // Login player
{
player_loggedin[playerid] = true;
SendClientMessage(playerid, 0x0040FFAA, "Login successful.");
}
else // Incorrect password
{
SendClientMessage(playerid, 0x0040FFAA, "Incorrect Password.");
}
}
else // No data was found for the player
{
SendClientMessage(playerid, 0x0040FFAA, "Please /register first.");
}
INI_Close(); // Remember to close open files when finished, no need to save this time
return 1;
}
SendClientMessage(playerid, 0x0040FFAA, "Login failed."); // There was an error opening "Users.ini"
return 1;
}

// Other functions include INI_Exists("filename"), INI_WriteInt("key", value), INI_WriteFloat("key", Float: value),
// value = INI_ReadInt("key"), Float: value = INI_ReadFloat("key"), INI_RemoveEntry("key") and INI_Remove("filename").



Download (updated link) (http://www.aussiegameserver.com/slick/www/samp/sii.php)


Please post feedback and any bugs if you find them..
Enjoy ;)

Jason_Gregory
18/12/2008, 04:05 AM
Wow looks nice dude gonna Test it soon.Are u sure about the Backward Compatbilty =?

[DRuG]Slick
18/12/2008, 11:20 PM
Yep compatibly with DINI and most other INI files is supported :D

[DRuG]Slick
19/12/2008, 12:00 AM
Sorry I should have explained it better.

When INI_Open is called, the file is parsed to memory. Now lets say you use INI_WriteString to add some data (a line), it will write to memory, not the file. Only when you call INI_Save will everything be written back to the original file. Then lastly, you would call INI_Close which frees up memory ready for opening again (doesn't touch the file). So the only time the physical file is accessed is during INI_Open and INI_Save.

Hope that helped

EDIT: I redone the first post with a tutorial demonstrating a basic accounts system :)

Antironix
19/12/2008, 11:43 AM
Slick ]
Sorry I should have explained it better.

When INI_Open is called, the file is parsed to memory. Now lets say you use INI_WriteString to add some data (a line), it will write to memory, not the file. Only when you call INI_Save will everything be written back to the original file. Then lastly, you would call INI_Close which frees up memory ready for opening again (doesn't touch the file). So the only time the physical file is accessed is during INI_Open and INI_Save.

Hope that helped

EDIT: I redone the first post with a tutorial demonstrating a basic accounts system :)

I guess you can also open every file on startup and write during the game to the memory, also reading from it. And when the game ends, it writes everything.

With game I mean calling OnGameModeInit and OnGameModeExit.

Mazza101
23/12/2008, 06:48 PM
Problem with mine atm.

Pawn:
ownCar1owner = INI_ReadString("ownCar1owner");
x = INI_ReadFloat("ownCar1x");
y = INI_ReadFloat("ownCar1y");
z = INI_ReadFloat("ownCar1z");
f = INI_ReadFloat("ownCar1f");
ownCar1 = AddStaticVehicle(560, x, y, z, f, 6, 0);

ownCar2owner = INI_ReadString("ownCar2owner");
x = INI_ReadFloat("ownCar2x");
y = INI_ReadFloat("ownCar2y");
z = INI_ReadFloat("ownCar2z");
f = INI_ReadFloat("ownCar2f");
ownCar2 = AddStaticVehicle(561, x, y, z, f, 6, 0);

Ini:
ownCar1owner=None
ownCar1x=1098
ownCar1y=-1774
ownCar1z=13.4
ownCar1f=268

ownCar2owner=None
ownCar2x=1098
ownCar2y=-1768
ownCar2z=13.4
ownCar2f=268


That is spawning the vehicle, but the first one faces the wrong direction and the second one is in completely the wrong place. Any ideas? (I've checked these co-ordinates and they're right).

KillFrenzy
24/12/2008, 01:32 AM
ownCar1owner=None
ownCar1x=1098
ownCar1y=-1774
ownCar1z=13.4
ownCar1f=268

ownCar2owner=None
ownCar2x=1098
ownCar2y=-1768
ownCar2z=13.4
ownCar2f=268

As far as I know, floats must not be alone, like, they must have a .0 on the end of it - otherwise are read as 0 - same for converting any other string to a float. So you should try changing that to this:

ownCar1owner=None
ownCar1x=1098.0
ownCar1y=-1774.0
ownCar1z=13.4
ownCar1f=268.0

ownCar2owner=None
ownCar2x=1098.0
ownCar2y=-1768.0
ownCar2z=13.4
ownCar2f=268.0




Also.. this part is wrong...
ownCar1owner = INI_ReadString("ownCar1owner");
ownCar2owner = INI_ReadString("ownCar2owner");
> stock INI_ReadString(dest[], const key[], maxlength = sizeof(dest))
You're using it wrong. Rather, It'd be:
INI_ReadString(ownCar1owner, "ownCar1owner");
INI_ReadString(ownCar2owner, "ownCar2owner");
Specify the size of the destination string if needed.


Oh yeah, if you're using it to store vehicles in that fashion, I'd suggest you increase the amount of lines, and store the XYZR like this, split using your own code by commas:
ownCar1pos=1098.0,-1774.0,13.4268.0,268.0
That results in a smaller file, and possibly even faster read/write speeds.


I've used SII for my entire gamemode - as far as I know, everything works perfectly.

Mazza101
24/12/2008, 01:40 AM
That still doesn't seem to work :S

EDIT: Those new string commands bring up an Argument mismatch error.
EDIT2: They cars spawn fine as long as I don't have the string stuff in there?

Works:
new float:x, float:y, float:z, float:f;

//INI_ReadString(ownCar1owner, "ownCar1owner");
x = INI_ReadFloat("ownCar1x");
y = INI_ReadFloat("ownCar1y");
z = INI_ReadFloat("ownCar1z");
f = INI_ReadFloat("ownCar1f");
ownCar1 = AddStaticVehicle(560, x, y, z, f, 6, 0);

//INI_ReadString(ownCar2owner, "ownCar2owner");
x = INI_ReadFloat("ownCar2x");
y = INI_ReadFloat("ownCar2y");
z = INI_ReadFloat("ownCar2z");
f = INI_ReadFloat("ownCar2f");
ownCar2 = AddStaticVehicle(561, x, y, z, f, 6, 0);

KillFrenzy
24/12/2008, 02:30 AM
> EDIT: Those new string commands bring up an Argument mismatch error.
I was assuming the variables 'ownCar1owner' and 'ownCar2owner' were strings, since a string is what you're reading. Right now, you have declared them as a normal integer - therefore an argument type mismatch.

Mazza101
24/12/2008, 03:11 AM
Got it all working, thanks :)

[DRuG]Slick
24/12/2008, 03:13 AM
I guess you can also open every file on startup and write during the game to the memory, also reading from it. And when the game ends, it writes everything.

With game I mean calling OnGameModeInit and OnGameModeExit.


Not quite, you can only have one file open at a time, which is why you don't need file ID's. That's why I recommend you lay out your code similar to:
if (INI_Open("filename"))
{
// Functions here
INI_Close();
}
To ensure any reading/writing functions don't get called if the file could not be opened. While this won't cause any direct problems, in a rare situation you might find you start manipulating data from another file that has been opened.

Glad to see you got it working Mazza101 :D

MX_Master
01/05/2009, 07:36 AM
i like it, but can you add a "sections" support? If you do this it will be the best INI include ever i seen

Goldkiller
01/05/2009, 10:04 AM
Works fine and is really easy to use.I'm going to use it for my Admin script :lol:.
I added some extra functions because I thought they might be usefull,at least if you change from DINI to SII ;).

>> pastebin<< (http://pastebin.com/f527d9500)

[DRuG]Slick
03/05/2009, 05:31 AM
Whoa awesome to see people using it after all this time :D I did actually start writing an updated version some time ago, seeing you guys are interested is the boost I needed to finish it, stay tuned!

MX_Master
04/05/2009, 05:13 PM
Slick ]
Whoa awesome to see people using it after all this time :D I did actually start writing an updated version some time ago, seeing you guys are interested is the boost I needed to finish it, stay tuned!

great, i hope we'll see something special )

Weirdosport
04/05/2009, 05:25 PM
How does this compare in terms of speed with DJSon, I know that they write the information in different ways, but as it's not me that reads the INI's and rather the computer, I don't really care >.> As long as the computer's happy, I am too.

MX_Master
19/05/2009, 06:11 PM
any updates?

BlackFoX
21/05/2009, 05:02 PM
Really nice Include

Trooper[Y]
23/07/2009, 01:04 PM
Vry nice Script, use it everytime :)

But now i got following error:
error 035: argument type mismatch (argument 1)
in
public untemp(string:playername)
{
if(INI_Open("temp.ini"))
{
INI_RemoveEntry(playername); //<<<<<<<<<<<<<<<<<<<<<<<<
INI_Save();
INI_Close();
}
return 1;
}
(Marked the error-line)

Hope on fast fix,
Trooper

yezizhu
23/07/2009, 01:19 PM
I'd sugges you use this code


public untemp(playername[])
{
if(INI_Open("temp.ini"))
{
INI_RemoveEntry(playername); //<<<<<<<<<<<<<<<<<<<<<<<<
INI_Save();
INI_Close();
}
return 1;
}

PS:It seems he didn't plan to release new update this year : o

Trooper[Y]
23/07/2009, 01:39 PM
Works, your a genious :P

Can you tell me, why it needed for "[]" ?

Chriss110
03/10/2009, 08:55 AM
The Download Link Doesn't Work Please Update ;)

[RSD]Jan
25/10/2009, 11:07 AM
Sometimes, when the server restart, the server.exe crashes..

aXE5LOk
14/11/2009, 11:21 PM
Dowload link down

Trooper[Y]
14/11/2009, 11:23 PM
Link down, new Mirror:
http://pastebin.com/f4d520410

Vincenzo77
17/01/2010, 11:05 AM
it doesn´t work for me it said
D:\eigener server neue version R4\gamemodes\Movie.pwn(16) : fatal error 100: cannot read from file: "SII"

[DRuG]Slick
07/04/2010, 11:12 AM
Download link has been fixed, thanks trooper for the mirror ;)


it doesn´t work for me it said
D:\eigener server neue version R4\gamemodes\Movie.pwn(16) : fatal error 100: cannot read from file: "SII"

Double check you have saved it in your includes directory and that the file type is inc not txt

MahmutBey
07/04/2010, 08:44 PM
thanks for system. you are big helper for me :)

cloud9
08/04/2010, 02:52 AM
Slick, i use this for my GM. it would be nice if you could give a tutorial of how to save and read arrays(two and three dimensional) using SII.tia.

MPKaboose
08/04/2010, 11:14 AM
Cool I might switch to this one and no my mom couldn't use this she can only use yahoo messenger and luxor (or wtf is the games name) :lol:

[DRuG]Slick
09/04/2010, 09:37 AM
Slick, i use this for my GM. it would be nice if you could give a tutorial of how to save and read arrays(two and three dimensional) using SII.tia.


Try this mate.. it's been a long time since I've done any pawn scripting so I hope this works :P
stock ArrayToKey(const key[], x, y = -1)
{
new string[INI_MAX_KEY];
if (!key[0]) return string;
if (y == -1) format(string, sizeof(string), "%s[%i]", key, x);
else format(string, sizeof(string), "%s[%i][%i]", key, x, y);
return string;
}

You will have to parse arrays manually in a loop, and use that function in place of key arguments.. eg
new myarray[3];
myarray[0] = 1;
myarray[1] = 2;
myarray[2] = 3;

// writing
for (new i; i < sizeof(myarray); i++)
{
INI_WriteInt(ArrayToKey("myarray", i), myarray[i]);
}

// reading
myarray[0] = INI_ReadInt(ArrayToKey("myarray", 0));

// this also works with 2d arrays.. ArrayToKey("myarray", 0, 1) etc


You could even write simpler functions that handle everything in fewer arguments but that's up to you ;)

DarkPower
09/04/2010, 09:43 AM
Awesome work dude ;)

MahmutBey
09/04/2010, 08:03 PM
How I Change Current Value...

Please...

cloud9
10/04/2010, 02:51 AM
Slick ]

Slick, i use this for my GM. it would be nice if you could give a tutorial of how to save and read arrays(two and three dimensional) using SII.tia.


Try this mate.. it's been a long time since I've done any pawn scripting so I hope this works :P
stock ArrayToKey(const key[], x, y = -1)
{
new string[INI_MAX_KEY];
if (!key[0]) return string;
if (y == -1) format(string, sizeof(string), "%s[%i]", key, x);
else format(string, sizeof(string), "%s[%i][%i]", key, x, y);
return string;
}

You will have to parse arrays manually in a loop, and use that function in place of key arguments.. eg
new myarray[3];
myarray[0] = 1;
myarray[1] = 2;
myarray[2] = 3;

// writing
for (new i; i < sizeof(myarray); i++)
{
INI_WriteInt(ArrayToKey("myarray", i), myarray[i]);
}

// reading
myarray[0] = INI_ReadInt(ArrayToKey("myarray", 0));

// this also works with 2d arrays.. ArrayToKey("myarray", 0, 1) etc


You could even write simpler functions that handle everything in fewer arguments but that's up to you ;)


Thank you Slick it worked,

MahmutBey
12/04/2010, 05:46 AM
How I Change Current Value...

Please...

cloud9
12/04/2010, 06:48 AM
How I Change Current Value...

Please...




Well, if you are asking about overwriting a value then it is simple justINI_WriteInt("XXX",456);
// The Syntax is
//INI_WriteInt("YOUR_VARIABLE_NAME",VALUE);

wofka13
13/06/2010, 09:24 PM
(sry for bad english! :mrgreen:)
Beautiful, but my problem is that nothing is stored in the file...

enum hInfo
{
Float:eX,
Float:eY,
Float:eZ,
Float:aX,
Float:aY,
Float:aZ,
};
new HausInfo[MAX_HOUSES][hInfo];

stock SaveHaus()
{
if(INI_Open("Haus.cfg"))
{
new house;
for(house = 0; house < MAX_HOUSES; house++)
{
INI_WriteFloat("eX=",HausInfo[house][eX]);
INI_Save();
INI_Close();
}
}
return 1;
}

Lightning[SV]
07/07/2010, 12:26 PM
I gave this include a test today alongside my dini system. Its significantly faster at writing data (im not sure about reading) and im planning to start using it to save some user data (bulk writing when they disconnect).

Has anyone had any issues with it failing to write a file because another was open already? I can see a problem occuring where with a busy server it could potentially need to save multiple users files at once, or is this impossible?.

Also i found a small bug. If you try and write a string with length 0 i.e INI_WriteString("Key", "") it doesn't write anything in the file. With dini it writes the key correctly.

thanks
Will

Trooper[Y]
07/07/2010, 02:06 PM
wil, dont keep several files for a long period opened, and theres no problem.

Always directly open, write/read, (save,) close

Y_Less
07/07/2010, 02:38 PM
Has anyone had any issues with it failing to write a file because another was open already? I can see a problem occuring where with a busy server it could potentially need to save multiple users files at once, or is this impossible?.


Yes, that's impossible in this system - if you open two inis at once they will conflict and cause problems.

I've also found a buffer overflow:


separator = strfind(line, "=", false);
if ((line[0] == ';') || (line[0] == '=') || (separator == -1) || (separator > INI_MAX_KEY))
{
if (line[0] == ';')
{
INI_strcpy(gCache[ln][E_VALUE], line, INI_MAX_VALUE, INI_MAX_VALUE);
}
else
{
INI_strcpy(gCache[ln][E_VALUE][1], line, INI_MAX_VALUE, INI_MAX_VALUE);
gCache[ln][E_VALUE][0] = ';';
}
continue;
}


If I have a line longer than 256 characters with no equals sign the else block will be called and will copy 128 characters to the global array, starting at position 1, from which point there are only 127 character slots, one of which needs to be the NULL terminator.

It also gives no indication at all when you run out of space in the buffer for lines, just fails silently.

kurta999
16/07/2010, 08:21 PM
Must use this ?

If(INI_Open( Account(playerid) ))

Dont this ?

INI_Open( Account(playerid) )

Sorry for my bad english.

Grim_
16/07/2010, 08:46 PM
You can use either one really, however I just use it ;

INI_Open(file[]);

Sniperwolves
29/07/2010, 02:51 PM
how to load a string out of the file?

INI_ReadString(Hanf[i][OwnedPlayer], "OwnedPlayer");

but still gives nothing :(

sk0t
30/07/2010, 11:53 PM
I'm making this post on behalf of Slick as he cant currently login his account here on the SA:MP forums.

Slick has just updated SII to 2.0.7.

The buffer overflow has been fixed.
The max lines have have been increased to 256 by default.
And some other small updates.

Please check the first post for the download.

r3k1lLz_
25/09/2010, 07:06 AM
Great work Slick making the switch from Dini to SII ;)

Retardedwolf
25/09/2010, 07:24 AM
Great work Slick making the switch from Dini to SII ;)

You're slow r3k.

I might go make a tutorial how to use SII to make a dialog register.

cyber_punk
25/09/2010, 07:27 AM
Great work Slick making the switch from Dini to SII ;)

you should probably look into y_ini as its faster than SII

Grim_
25/09/2010, 05:54 PM
you should probably look into y_ini as its faster than SII

The results Y_Less posted (last time I checked) were FAR from the results shown on the first post in this thread. Y_Less himself said he may have not used the same functions in the same way Slick did to get the results. With that being said, there is no real certainty which is faster, yet.

cyber_punk
25/09/2010, 06:57 PM
The results Y_Less posted (last time I checked) were FAR from the results shown on the first post in this thread. Y_Less himself said he may have not used the same functions in the same way Slick did to get the results. With that being said, there is no real certainty which is faster, yet.

*Cough* RAW file functions that are already included into Pawn....even slick shows that...

Grim_
26/09/2010, 04:07 PM
*Cough* RAW file functions that are already included into Pawn....even slick shows that...

Yes...

And the results he shows are that his library is just as fast as the RAW file functions.

GaGlets(R)
26/09/2010, 04:14 PM
Suits on Linux?

Lorenc_
14/11/2010, 09:28 AM
This is moar than lovely xD The easiest! File system! eva!

Anthonyx3'
01/01/2011, 07:33 AM
Quick question, if i wanted to use enums with this system how do i do it? because i keep getting registration failed -.-

legodude
01/01/2011, 12:30 PM
omg wonderful.

y_less's ini system is a bit too complicated. but this is not too hard(at least it looks like it's not :))
good job there mate!

Ricop522
06/06/2011, 06:41 PM
omg wonderful.

y_less's ini system is a bit too complicated. but this is not too hard(at least it looks like it's not :))
good job there mate!


True !

I like :D

[KO]KillerThriller
06/06/2011, 07:04 PM
how to load a string out of the file?

INI_ReadString(Hanf[i][OwnedPlayer], "OwnedPlayer");

but still gives nothing :(

how to load a string out of the file?

INI_ReadString(Hanf[i][OwnedPlayer], "OwnedPlayer");

but still gives nothing
Like i figured it out my self
It's INI_ReadString(VarToStore[], Where you want to read, sizeofit);
Ex:

new vartostore[128];
INI_ReadString(vartostore,"Sometext",sizeof(vartostore));

Soumi
30/07/2011, 07:34 PM
Good job :D, i'm using this for my Gamemode registration system.

AK47317
12/11/2011, 12:21 AM
great! easier to learn :D

boelie
13/04/2012, 12:21 PM
Hi,

Well im using your SII ini writer to write vehicle info into a file. Somehow it dont seem to cach the
model of the car. In the file the model remains at ' 0 ' .
Here's what i got;

enum carDataEnum
{
vModel,
vColor1,
vColor2,
Float:vPosX,
Float:vPosY,
Float:vPosZ,
Float:vPosA,
vPaintJ
}
new vInfo[MAX_VEHICLES][carDataEnum];

stock SavePrivVeh(playerid,iVehicleID)
{
new PName[MAX_PLAYER_NAME + 20],iStr[15];//15

GetVehiclePos(iVehicleID,vInfo[iVehicleID][vPosX],vInfo[iVehicleID][vPosY],vInfo[iVehicleID][vPosZ]);
GetVehicleZAngle(iVehicleID,vInfo[iVehicleID][vPosA]);

GetVehicleModel(vInfo[iVehicleID][vModel]);//

GetPlayerName(playerid, PName, sizeof(PName));
format(iStr, sizeof(iStr), "%s.ini",PName);
if(INI_Open(iStr))
{
INI_WriteInt("Model", vInfo[iVehicleID][vModel]);
INI_WriteInt("Color1", vInfo[iVehicleID][vColor1]);
INI_WriteInt("Color2", vInfo[iVehicleID][vColor2]);
INI_WriteFloat("vPosX", vInfo[iVehicleID][vPosX]);
INI_WriteFloat("vPosY", vInfo[iVehicleID][vPosY]);
INI_WriteFloat("vPosZ", vInfo[iVehicleID][vPosZ]);
INI_WriteFloat("vPosA", vInfo[iVehicleID][vPosA]);
INI_WriteInt("PaintJ", vInfo[iVehicleID][vPaintJ]);

INI_Save();
INI_Close();
}
return 1;
}

The floats do work..any ideas ???
i got the update to 0.7 from SII

XtremeR
01/10/2012, 06:44 AM
nice one rep +!

JEkvall95
22/06/2013, 04:07 PM
The link doesn't work... :(

Kreatyve
22/06/2013, 04:10 PM
Yay I've been waiting for the opportunity to use this image...

<removed - this isn't a spam forum>

Look at the dates of the post. Obviously this thread is outdated.

JEkvall95
22/06/2013, 04:39 PM
But... I need SII

What to do then?

Y_Less
22/06/2013, 04:43 PM
Use a different INI system? There are loads of them about.

BloodyEric
22/06/2013, 04:52 PM
Here you go: http://pastebin.com/N54mTqU3

Joshly98
25/06/2013, 09:09 PM
When I use that link (that BloodyEric posted) and save it as a .inc file (SII.inc). Then when I used the include

#include <SII.inc>

and run the server.exe file, it gives me runtime error 19...

Can anyone pleeaassee help??

Craig3412
26/06/2013, 01:21 AM
Link is broken

Joshly98
26/06/2013, 05:52 AM
Link definitely needs an update to a working .inc file :)

OpticKiller
01/07/2013, 07:16 AM
can someone give me a working link...

drichie
04/07/2013, 11:38 AM
is this has rename function?

lewos
14/07/2013, 03:47 AM
Your link is dead :(

xIs0BiHx
21/07/2013, 01:49 PM
Dead Link.

a.z.a.r
05/08/2013, 11:28 AM
link dead... upload IT!

Uberanwar
06/08/2013, 01:56 AM
Link dead

RealCop228
06/08/2013, 01:58 AM
Oh the link is dead? Hm. Let's respond to the topic that was posted in '08 and say the link is dead a few more times; I'm sure the author is still around to replace it for us!

:picard:

SII is slow compared to todays methods anyways. Use y_ini.

Bakr
06/08/2013, 02:31 AM
SII is slow compared to todays methods anyways. Use y_ini.

Actually, not really. It is still a great system to use if you have no reason to use the extra features that come along with y_ini.

RealCop228
06/08/2013, 02:42 AM
While it's faster than dini, isn't it slower than y_ini? Why would someone use a slower system over a faster one just because they don't need the features it offers?

Bakr
06/08/2013, 02:52 AM
While it's faster than dini, isn't it slower than y_ini? Why would someone use a slower system over a faster one just because they don't need the features it offers?

I was under the impression that it wasn't, but after seeing the test results on the y_ini page it seems I was mistaken. I'll run a couple tests myself as well, as I don't think the results on SII in those tests are completely accurate.

EDIT: Nevermind! I don't have a mirror of the file either.

RealCop228
06/08/2013, 02:58 AM
Either way, I haven't seen anyone use SII in awhile. This include obviously hasn't been updated either so IMHO it is better to use something that gets updates regularly (like the YSI library).

Bakr
06/08/2013, 03:04 AM
Either way, I haven't seen anyone use SII in awhile. This include obviously hasn't been updated either so IMHO it is better to use something that gets updates regularly (like the YSI library).

Agreed, I have to give great credit to Y_Less for keeping up with YSI as he has.

qazwsx
12/08/2013, 03:26 PM
Link is out of date? o.O

RealCop228
12/08/2013, 03:29 PM
It has been for at least two months now..

kjek98
22/08/2013, 12:00 AM
I know this most probably is not allowed but i think some people need this include so here is the download link.
http://www.mediafire.com/?cfdujev7qbckczr

Arjanz
10/03/2014, 03:22 PM
thnks for the link

JohnD123
11/04/2014, 12:44 AM
The link doesn't work
edit:
nvm

KurtBart
15/04/2014, 08:00 PM
I can't download it page is not available or does not exist. Please fix it