Question about dini
#3

Quote:

Yes, but not using dini directly, you would just need to loop through numbers and call "fexist" on each one (with ".ini" appended to each number). This is, however, VERY inefficient as you need to query the hard disk for ever single file (which can take a LONG time if you have lots of files).

Ok, I do understand that part, and the bottom a little.
Just, How would I make the index then?
I might have an idea, but as I am relatively new to scripting(bout 2-3 weeks) I am not completely sure.
Could you give me your opinion on this?

ofcourse, this is not detailed or something, Since I will have to think about how to make this.
But is this going the right way? or is itcompletly wrong?
pawn Код:
enum Vindex
{
    topnumber,
}

new Index[Vindex];
format(file,sizeof(file),"realityrp/vehicles/Vindex.ini");
    if (!dini_Exists(file))
    {
        dini_Create(file);
        dini_IntSet(file, "topnumber",Index[topnumber] = 0);
    }
    if(fexist(file))
    {      
        dini_IntSet(file, "topnumber",Index[topnumber] = topnumber + 1);
    }
Reply


Messages In This Thread
Question about dini - by milanosie - 23.01.2012, 13:26
Re: Question about dini - by ricardo178 - 23.01.2012, 13:49
Re: Question about dini - by milanosie - 23.01.2012, 13:58
Re: Question about dini - by Konstantinos - 23.01.2012, 14:00
Re: Question about dini - by milanosie - 23.01.2012, 14:03
Re: Question about dini - by milanosie - 23.01.2012, 14:11
Re: Question about dini - by Konstantinos - 23.01.2012, 14:13
Re: Question about dini - by milanosie - 23.01.2012, 14:16
Re: Question about dini - by milanosie - 23.01.2012, 15:33
Re: Question about dini - by SchurmanCQC - 23.01.2012, 15:38

Forum Jump:


Users browsing this thread: 1 Guest(s)