11-06-2007, 05:06 PM
I've been working on something lately, and I need to do something that I haven't done with an ini file before. I haven't yet messed around with this bit as I'm in the process of programming the other parts.
I wouldn't say it's a complex idea, which is why I've posted this in the beginner section. Thinking about it in my mind though hasn't seem to spark any good methods of achieving it, so I wanted to get some possible solutions from other people before I attempted to start working on this part of the system.
The ini file is made up of 4 different headers, each containing 10-100 values, which will contain players names. I've put 5 on here as an example:
Now, the first bit of this part of the system involves adding names and removing names. Finding a blank space and adding the name is fairly easy. Now I need to add some code that removes a specific name from one of the headers.
The next bit of this involves working with both of those methods, removing a specific name and adding it into a specific header.
I could probably use this system for my WizList security feature too, making it more easy to add and remove GMs from the WizList.
Thanks.
I wouldn't say it's a complex idea, which is why I've posted this in the beginner section. Thinking about it in my mind though hasn't seem to spark any good methods of achieving it, so I wanted to get some possible solutions from other people before I attempted to start working on this part of the system.
The ini file is made up of 4 different headers, each containing 10-100 values, which will contain players names. I've put 5 on here as an example:
Code:
[HEADER1]
Name1=
Name2=
Name3=
Name4=
Name5=
[HEADER2]
Name1=
Name2=
Name3=
Name4=
Name5=
[HEADER3]
Name1=
Name2=
Name3=
Name4=
Name5=
[HEADER4]
Name1=
Name2=
Name3=
Name4=
Name5=
Now, the first bit of this part of the system involves adding names and removing names. Finding a blank space and adding the name is fairly easy. Now I need to add some code that removes a specific name from one of the headers.
The next bit of this involves working with both of those methods, removing a specific name and adding it into a specific header.
I could probably use this system for my WizList security feature too, making it more easy to add and remove GMs from the WizList.
Thanks.