In the file you can just add more

 "gamelist"
   {
       "AdditionalID"        "120"
       "AdditionalID"        "121"
       "AdditionalID"        "122"
       "AdditionalID"        "123"
   }

and then parse it out in code using a sub key iteration.  If you want to add
duplicates in code I think it's a case of just create new key values with
the values add them as sub keys instead of doing the set methods.

On Tue, Nov 16, 2010 at 1:56 AM, Trevor 'Drak' <dhlco...@wowway.com> wrote:

> File structure:
>
> "mount_list.txt"
> {
>    "gamelist"
>    {
>        "AdditionalID"        "120"
>    }
> }
>
> If I wanted to add another “AdditionalID” with a different value, how can I
> do this?
> This, just replaces the key.
>
> KeyValues *pNew = pMainFile->FindKey( "GameList" );
> pNew->SetInt( "AdditionalID", 200 );
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to