Merge two KeyValues trees
Hi guys,
Please advise the easiest way to join two KeyValues trees stored in two separate files with the same root name to one KeyValyes structure. I mean: Code:
First kv file file1.txt Code:
Second kv file file2.txt Code:
new_kv |
Re: Merge two KeyValues trees
Try this:
PHP Code:
|
Re: Merge two KeyValues trees
Thanks!
Is it the easiest way? I mean quite a lot of code :( I read about a trick with keyname "#base" here: https://forums.alliedmods.net/showthread.php?t=279853 It looks more simple. However, I haven't managed to achieve my result :( Anyway, thanks a lot for the clean and complete code! |
Re: Merge two KeyValues trees
https://sm.alliedmods.net/new-api/Ke...ImportFromFile
Imports a file in KeyValues format. The file is read into the current position of the tree. Try this: PHP Code:
|
Re: Merge two KeyValues trees
Quote:
|
All times are GMT -4. The time now is 22:43. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.