How to Load a file with Y_INI?
#1

Hello there. Well, i started a Game-Mode with Y_INI as saving system, to practise more modern scripting, and stop using dini.

The problem is, i started with my vehicle system, where every cars being them rental or faction will be created in-game, by /createvehicle, and i succeded in creating the file. Just, now i need to know how to load it to the enum info, and also cos i need to load the ID's file, in order to get the right vehicle ID to create, as it works with topnumber, which increases 1 each time a car is created, so next vehicle will be 1 ID up.


I readed ****** tutorial, but i don't understand. I SIMPLY want to load a .ini file named ids.ini that is in scriptfiles, but i can't do it. xD I can't figure how to do it.

Inside that file there is CARID=0, i want to load that as CarIDInfo[CID];

If i was using dini, would be as simple as:

pawn Код:
new file[64];
format(file, sizeof(file), "ids.ini");
if(fexist(file))
{
    CarIDInfo[CID] = dini_Int(file, "CARID");
    return 1;
}
How can i do this with Y_INI?
Thanks in advance.
Reply


Messages In This Thread
How to Load a file with Y_INI? - by ricardo178 - 20.08.2012, 21:33

Forum Jump:


Users browsing this thread: 1 Guest(s)