| Mirage Source http://web.miragesource.net/forums/ |
|
| Working with INI http://web.miragesource.net/forums/viewtopic.php?f=201&t=2029 |
Page 1 of 1 |
| Author: | Xlithan [ Mon Jun 11, 2007 5:06 pm ] |
| Post subject: | Working with INI |
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: 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. |
|
| Author: | Dragoons Master [ Mon Jun 11, 2007 8:43 pm ] |
| Post subject: | Re: Working with INI |
That's white easy, use the INI functions that you already have at your game and loop thru all the posible names searching for a name. It's no problem at all, the ini functions already make all the hard work for you. Just loop it ^^ |
|
| Author: | Xlithan [ Mon Jun 11, 2007 11:56 pm ] |
| Post subject: | Re: Working with INI |
problem solved I think. Some more testing needed but I think I've got it. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|