[Tutorial] Using y_xml to write/read xml files. [Another way to write CFG data but better]
#6

Quote:
Originally Posted by Ahmad45123
Посмотреть сообщение
And if you have this in y_ini.. You'll have to have a folder in scriptfiles and you will have to store each biz in each own ini file.
This argument is very illogical. It is only the common practice to have every biz assigned to it's own file, while it is not the only way to do it. You actually can have one .ini / text file for every biz, pretty much the same way(by using a string seperating one segment from another - also identifying the ID of the current segment).

Example from the Y_ini tutorial thread(although I have never used it before - and will refuse to I will use his example)

pawn Код:
new
    // The name of the file, can be any string variable or literal.
    fileToWrite[] = "mine.INI",
   
    // "INI_Open" returns a variable with tag "INI".
    INI:iniFile = INI_Open(fileToWrite);

//
// y_ini supports tags, that is:
//
//  [tag]
//  key = value
//
INI_SetTag(iniFile, "examples");

// Write an integer value with the key "some_integer" under the current tag:
INI_WriteInt(iniFile, "some_integer", 42);

// Now close the current file:
INI_Close(iniFile);
Basically, this has "tags" which can identify the segment validating a false statement in your claim. I have nothing against ****** however there is no need to make an include for every single possible thing you can think of.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)