Author |
Message |
Falco_ Newbie

Age:36 Gender: Joined: Jun 05 2005 Posts: 4 Location: North Carolina Offline
|
Posted: Mon Jun 13, 2005 11:28 pm Post subject: ifstream help |
 |
|
|
|
Could someone help me with a top 5 plug. Basically it will record all of the players that have played elim and will search through a file to find the best to worst rec and will display it when you say !top # Does merv support searching through a file and deleting old info? (For example: a name is already in a file, and has its win:loss ratio; i want to change it but del the old info) If there is a better way to do this please tell me because i always code the long way. lol. |
|
Back to top |
|
 |
CypherJF I gargle nitroglycerin

Gender: Joined: Aug 14 2003 Posts: 2582 Location: USA Offline
|
Posted: Mon Jun 13, 2005 11:54 pm Post subject: |
 |
|
|
|
No merv doesn't support a feature such as this natively. I personally like using INI files because their quick and ez - though they are probably inefficient? But as for you, I'd suggest making your own internal structure - read the data from the file - handling the ordering of the data as you read in each new entry. _________________ Performance is often the art of cheating carefully. - James Gosling |
|
Back to top |
|
 |
Falco_ Newbie

Age:36 Gender: Joined: Jun 05 2005 Posts: 4 Location: North Carolina Offline
|
|
Back to top |
|
 |
Purge Episode I > Eposide III Jar-Jar is kool

Age:35 Gender: Joined: Sep 08 2004 Posts: 2019 Offline
|
Posted: Tue Jun 14, 2005 11:40 am Post subject: |
 |
|
|
|
If you need help making the bot read from a text file such as an INI, refer here. |
|
Back to top |
|
 |
Bak ?ls -s 0 in

Age:26 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Tue Jun 14, 2005 2:57 pm Post subject: Re: ifstream |
 |
|
|
|
Read the data in from the file as you write it out to a temporary file (or a temporary data structure). Update any data you want. Copy the temp file back over the original one (or from the data structure). _________________ SubSpace Discretion: A Third Generation SubSpace Client |
|
Back to top |
|
 |
|