<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alliedmods.net/index.php?action=history&amp;feed=atom&amp;title=Ru%3AKeyValues_%28SourceMod_Scripting%29</id>
	<title>Ru:KeyValues (SourceMod Scripting) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alliedmods.net/index.php?action=history&amp;feed=atom&amp;title=Ru%3AKeyValues_%28SourceMod_Scripting%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Ru:KeyValues_(SourceMod_Scripting)&amp;action=history"/>
	<updated>2026-05-10T08:04:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.6</generator>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Ru:KeyValues_(SourceMod_Scripting)&amp;diff=7918&amp;oldid=prev</id>
		<title>V1KT0P: /* Deletion */</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Ru:KeyValues_(SourceMod_Scripting)&amp;diff=7918&amp;oldid=prev"/>
		<updated>2010-12-25T05:23:17Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Deletion&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 05:23, 25 December 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l109&quot; &gt;Line 109:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 109:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Эта функция будет просматривать всю структуру KeyValues.&amp;#160; Обратите внимаеие, что каждый успешный вызов &amp;lt;tt&amp;gt;KvGotoFirstSubKey&amp;lt;/tt&amp;gt; сопровождается вызовом &amp;lt;tt&amp;gt;KvGoBack&amp;lt;/tt&amp;gt;.&amp;#160; Это потому, что первый помещается в стек перемещения.&amp;#160; Мы должны взять позицию для того, чтоб могли продолжить просмотр с нашей старой позиции.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Эта функция будет просматривать всю структуру KeyValues.&amp;#160; Обратите внимаеие, что каждый успешный вызов &amp;lt;tt&amp;gt;KvGotoFirstSubKey&amp;lt;/tt&amp;gt; сопровождается вызовом &amp;lt;tt&amp;gt;KvGoBack&amp;lt;/tt&amp;gt;.&amp;#160; Это потому, что первый помещается в стек перемещения.&amp;#160; Мы должны взять позицию для того, чтоб могли продолжить просмотр с нашей старой позиции.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Deletion&lt;/del&gt;=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Удаление&lt;/ins&gt;=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;There are two ways to delete sections from a &lt;/del&gt;KeyValues &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;structure&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Есть два пути для удаления секции из структуры &lt;/ins&gt;KeyValues:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;lt;tt&amp;gt;KvDeleteKey&amp;lt;/tt&amp;gt; - &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Safely removes a named sub-section and any of its child sections&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;keys&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;lt;tt&amp;gt;KvDeleteKey&amp;lt;/tt&amp;gt; - &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Безопасное удаление имени подраздела и все дочерние секции&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ключи&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;lt;tt&amp;gt;KvDeleteThis&amp;lt;/tt&amp;gt; - &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Safely removes the current position if possible&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;lt;tt&amp;gt;KvDeleteThis&amp;lt;/tt&amp;gt; - &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Безопасное удаление текущей позиции, если это возможно&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Simple Deletion&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Простое Удаление&lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;First, let's use our &lt;/del&gt;&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;basic lookup&lt;/del&gt;&amp;quot; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;example to delete a &lt;/del&gt;Steam ID &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;section&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Для начала используем наш пример &lt;/ins&gt;&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;базовый просмотр&lt;/ins&gt;&amp;quot; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;для удаления секции &lt;/ins&gt;Steam ID:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pawn&amp;gt;RemoveSteamID(const String:steamid[])&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pawn&amp;gt;RemoveSteamID(const String:steamid[])&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l130&quot; &gt;Line 130:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 130:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&amp;lt;/pawn&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&amp;lt;/pawn&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Note&lt;/del&gt;:''' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;We called &lt;/del&gt;&amp;lt;tt&amp;gt;KvRewind&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;so the file would be dumped from the root position&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;instead of the current one&lt;/del&gt;.&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Обратите внимание&lt;/ins&gt;:''' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Мы вызвали &lt;/ins&gt;&amp;lt;tt&amp;gt;KvRewind&amp;lt;/tt&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;так файл будет сбрасываться с корневой позиции&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;вместо текущей&lt;/ins&gt;.&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Iterative Deletion&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Повторяющееся Удаление&lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Likewise, let's show how our earlier iterative example could be adapted for deleting a section&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;For this we can use &lt;/del&gt;&amp;lt;tt&amp;gt;KvDeleteThis&amp;lt;/tt&amp;gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;which deletes the current position from the previous position in the traversal stack&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Кроме того давайте покажем как ранее повторяющийся пример может быть адаптирован для удаления раздела&lt;/ins&gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Для этого мы используем &lt;/ins&gt;&amp;lt;tt&amp;gt;KvDeleteThis&amp;lt;/tt&amp;gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;который удаляет текущую позицию из предыдущей позиции в стеке перемещения&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pawn&amp;gt;RemoveSteamID(const String:steamid[])&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pawn&amp;gt;RemoveSteamID(const String:steamid[])&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l160&quot; &gt;Line 160:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 160:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&amp;lt;/pawn&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&amp;lt;/pawn&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Full Deletion&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Полное Удаление&lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Lastly, let's take a look at how we would delete all &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;or some&lt;/del&gt;) &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;keys&lt;/del&gt;.&amp;#160; &amp;lt;tt&amp;gt;KvDeleteThis&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;has the special property that it can act as an automatic iterator&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;When it deletes a key&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;it automatically attempts to advance to the next one, as &lt;/del&gt;&amp;lt;tt&amp;gt;KvGotoNextKey&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;would&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;If it can't find any more keys, it simply pops the traversal stack&lt;/del&gt;.&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Наконец давайте посмотрим как удалить все &lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;или некоторые&lt;/ins&gt;) &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ключи&lt;/ins&gt;.&amp;#160; &amp;lt;tt&amp;gt;KvDeleteThis&amp;lt;/tt&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;как особое свойство которое может действовать в качестве автоматического итератора&lt;/ins&gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Когда удаляется ключ автоматически переходим к следующему&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;как если бы вызвали &lt;/ins&gt;&amp;lt;tt&amp;gt;KvGotoNextKey&amp;lt;/tt&amp;gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Если больше нет ключей просто берет стек перемещения&lt;/ins&gt;.&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;An example of deleting all SteamIDs that have blank names&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Пример удаление всех SteamID-ов содержащие пустые имена&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pawn&amp;gt;DeleteAll(Handle:kv)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pawn&amp;gt;DeleteAll(Handle:kv)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l187&quot; &gt;Line 187:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 187:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&amp;lt;/pawn&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&amp;lt;/pawn&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;While at first this loop looks infinite&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;it is not&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;If &lt;/del&gt;&amp;lt;tt&amp;gt;KvDeleteThis&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;fails to find a subsequent key&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;it will break out of the loop&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Similarly&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;if &lt;/del&gt;&amp;lt;tt&amp;gt;KvGotoNextKey&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;fails&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the loop will end&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Хотя это и выглядет как бесконечный цикл&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;это не так&lt;/ins&gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Как только &lt;/ins&gt;&amp;lt;tt&amp;gt;KvDeleteThis&amp;lt;/tt&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;вернет неудачу при нахождении ключа&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;произойдет разрыв цекла&lt;/ins&gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Аналогично&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;если &lt;/ins&gt;&amp;lt;tt&amp;gt;KvGotoNextKey&amp;lt;/tt&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;вернет неудачу&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;цикл закончится&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Ru:SourceMod Scripting]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Ru:SourceMod Scripting]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>V1KT0P</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Ru:KeyValues_(SourceMod_Scripting)&amp;diff=7917&amp;oldid=prev</id>
		<title>V1KT0P: /* Повторяющийся просмотр */</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Ru:KeyValues_(SourceMod_Scripting)&amp;diff=7917&amp;oldid=prev"/>
		<updated>2010-12-25T05:16:17Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Повторяющийся просмотр&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 05:16, 25 December 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l62&quot; &gt;Line 62:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 62:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''Обратите внимание:''' &amp;lt;tt&amp;gt;KvJumpToKey&amp;lt;/tt&amp;gt; является нативным перемещением, что изменения уровней вложенности стека перемещения.&amp;#160; Однако &amp;lt;tt&amp;gt;CloseHandle&amp;lt;/tt&amp;gt; не будет случайно закрывать текущий уровень структуры KeyValues.&amp;#160; Это закроет всю вещь.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''Обратите внимание:''' &amp;lt;tt&amp;gt;KvJumpToKey&amp;lt;/tt&amp;gt; является нативным перемещением, что изменения уровней вложенности стека перемещения.&amp;#160; Однако &amp;lt;tt&amp;gt;CloseHandle&amp;lt;/tt&amp;gt; не будет случайно закрывать текущий уровень структуры KeyValues.&amp;#160; Это закроет всю вещь.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Повторяющийся &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;просмотр&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Повторяющийся &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Просмотр&lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Давайте модифицируер предыдущий пример для использования повторов.&amp;#160; Это имеет ту же функциональность, но демонстрирует, как для просмотра в течение многих разделах.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Давайте модифицируер предыдущий пример для использования повторов.&amp;#160; Это имеет ту же функциональность, но демонстрирует, как для просмотра в течение многих разделах.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>V1KT0P</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Ru:KeyValues_(SourceMod_Scripting)&amp;diff=7916&amp;oldid=prev</id>
		<title>V1KT0P: /* Перемещение */</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Ru:KeyValues_(SourceMod_Scripting)&amp;diff=7916&amp;oldid=prev"/>
		<updated>2010-12-25T05:11:15Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Перемещение&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 05:11, 25 December 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l37&quot; &gt;Line 37:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 37:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Например, &amp;lt;tt&amp;gt;KvJumpToKey&amp;lt;/tt&amp;gt; будет пытаться найтим под-ключ под текущим разделом.&amp;#160; При успехе позиция в дереве изменяется перемещением вниз на один уровень, и, следовательно, эта позиция помещается в стек перемещения.&amp;#160; Теперь операции такие как &amp;lt;tt&amp;gt;KvGetString&amp;lt;/tt&amp;gt; будут использовать эту новую позицию.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Например, &amp;lt;tt&amp;gt;KvJumpToKey&amp;lt;/tt&amp;gt; будет пытаться найтим под-ключ под текущим разделом.&amp;#160; При успехе позиция в дереве изменяется перемещением вниз на один уровень, и, следовательно, эта позиция помещается в стек перемещения.&amp;#160; Теперь операции такие как &amp;lt;tt&amp;gt;KvGetString&amp;lt;/tt&amp;gt; будут использовать эту новую позицию.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;There are natives which change the position but do not change the traversal stack&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;For example&lt;/del&gt;, &amp;lt;tt&amp;gt;KvGotoNextKey&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;will change the current section being viewed&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;but there are no &lt;/del&gt;push/pop &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;operations to the traversal stack&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;This is because the nesting level did not change&lt;/del&gt;; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;it advances to the next section at the same level&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;rather than finding a section a level deeper&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Это нативные изменяют положение, но не меняют стек перемещения&lt;/ins&gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Например&lt;/ins&gt;, &amp;lt;tt&amp;gt;KvGotoNextKey&amp;lt;/tt&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;будет менять текущий раздел перед просмотром&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;но это не является &lt;/ins&gt;push/pop &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;операциями для стека перемещения&lt;/ins&gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Это потому, что уровень вложенности не изменился&lt;/ins&gt;; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;он проходит в следующий раздел на том же уровне&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;скорее чем найти секцию уровнем глубже&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;More traversal natives&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Больше нативных перемещений&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;lt;tt&amp;gt;KvGotoFirstSubKey&amp;lt;/tt&amp;gt; - &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Finds the first sub-section under the current section&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;This pushes the section onto the traversal stack&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;lt;tt&amp;gt;KvGotoFirstSubKey&amp;lt;/tt&amp;gt; - &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Находит первый подраздел ниже текущей позиции&lt;/ins&gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Это помещает раздел на стек перемещения&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;lt;tt&amp;gt;KvGoBack&amp;lt;/tt&amp;gt; - &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Pops the traversal stack &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;moves up one level&lt;/del&gt;).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;lt;tt&amp;gt;KvGoBack&amp;lt;/tt&amp;gt; - &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Берет из стека перемещения &lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;поднимается на уровень выше&lt;/ins&gt;).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;lt;tt&amp;gt;KvRewind&amp;lt;/tt&amp;gt; - &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Clears the traversal stack so the current position is the root node&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;lt;tt&amp;gt;KvRewind&amp;lt;/tt&amp;gt; - &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Стирает из стека перемещения текущую позицию в главном узле&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Basic Lookup&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Основной Просмотр&lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Let's take our &lt;/del&gt;&amp;lt;tt&amp;gt;MyFile&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;example from above&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;How could we retrieve the name &lt;/del&gt;&amp;quot;crab&amp;quot; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;given the &lt;/del&gt;Steam ID?&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Давайте возьмем наш пример &lt;/ins&gt;&amp;lt;tt&amp;gt;MyFile&amp;lt;/tt&amp;gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Как мы можем получить имя &lt;/ins&gt;&amp;quot;crab&amp;quot; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;учитывая &lt;/ins&gt;Steam ID?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pawn&amp;gt;bool:GetNameFromSteamID(const String:steamid[], String:name[], maxlength)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pawn&amp;gt;bool:GetNameFromSteamID(const String:steamid[], String:name[], maxlength)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l60&quot; &gt;Line 60:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 60:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&amp;lt;/pawn&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&amp;lt;/pawn&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Note&lt;/del&gt;:''' &amp;lt;tt&amp;gt;KvJumpToKey&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is a traversal native that changes the nesting level of the traversal stack&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;However, &lt;/del&gt;&amp;lt;tt&amp;gt;CloseHandle&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;will not accidentally close only the current level of the &lt;/del&gt;KeyValues &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;structure&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;It will close the entire thing&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Обратите внимание&lt;/ins&gt;:''' &amp;lt;tt&amp;gt;KvJumpToKey&amp;lt;/tt&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;является нативным перемещением, что изменения уровней вложенности стека перемещения&lt;/ins&gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Однако &lt;/ins&gt;&amp;lt;tt&amp;gt;CloseHandle&amp;lt;/tt&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;не будет случайно закрывать текущий уровень структуры &lt;/ins&gt;KeyValues.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Это закроет всю вещь&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Iterative Lookup&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Повторяющийся просмотр&lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Let's modify our previous example to use iteration&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;This has the same functionality&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;but demonstrates how to browse over many sections&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Давайте модифицируер предыдущий пример для использования повторов&lt;/ins&gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Это имеет ту же функциональность&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;но демонстрирует, как для просмотра в течение многих разделах&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pawn&amp;gt;bool:GetNameFromSteamID(const String:steamid[], String:name[], maxlength)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pawn&amp;gt;bool:GetNameFromSteamID(const String:steamid[], String:name[], maxlength)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l91&quot; &gt;Line 91:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 91:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&amp;lt;/pawn&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&amp;lt;/pawn&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Note&lt;/del&gt;:''' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;In this example, note that &lt;/del&gt;&amp;lt;tt&amp;gt;KvGotoNextKey&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is an iterative function&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;not a traversal one&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Since it does not change the nesting level&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;we don't need to call &lt;/del&gt;&amp;lt;tt&amp;gt;KvGoBack&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;to return and continue iterating&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Обратите внимание&lt;/ins&gt;:''' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;В этом примере отметим что &lt;/ins&gt;&amp;lt;tt&amp;gt;KvGotoNextKey&amp;lt;/tt&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;является итеративной функции&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;не однократное перемещение&lt;/ins&gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Так как это не меняет уровень вложенности&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;мы не должны вызывать &lt;/ins&gt;&amp;lt;tt&amp;gt;KvGoBack&amp;lt;/tt&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;для возврата и продолжения итерации&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Full Traversal&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Полное Перемещение&lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Let's say we wanted to browse every section of a &lt;/del&gt;KeyValues &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;file&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;An example of this might look like&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Например мы хотим просмотреть каждую секцию файла &lt;/ins&gt;KeyValues.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Пример как это может выглядеть&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pawn&amp;gt;BrowseKeyValues(Handle:kv)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pawn&amp;gt;BrowseKeyValues(Handle:kv)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l107&quot; &gt;Line 107:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 107:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&amp;lt;/pawn&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&amp;lt;/pawn&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;This function will browse an entire &lt;/del&gt;KeyValues &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;structure&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Note that every successful call to &lt;/del&gt;&amp;lt;tt&amp;gt;KvGotoFirstSubKey&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is paired with a call to &lt;/del&gt;&amp;lt;tt&amp;gt;KvGoBack&amp;lt;/tt&amp;gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;This is because the former pushes onto the traversal stack&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;We must pop the position off so we can continue browsing from our old position&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Эта функция будет просматривать всю структуру &lt;/ins&gt;KeyValues.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Обратите внимаеие, что каждый успешный вызов &lt;/ins&gt;&amp;lt;tt&amp;gt;KvGotoFirstSubKey&amp;lt;/tt&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;сопровождается вызовом &lt;/ins&gt;&amp;lt;tt&amp;gt;KvGoBack&amp;lt;/tt&amp;gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Это потому, что первый помещается в стек перемещения&lt;/ins&gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Мы должны взять позицию для того, чтоб могли продолжить просмотр с нашей старой позиции&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Deletion=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Deletion=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>V1KT0P</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Ru:KeyValues_(SourceMod_Scripting)&amp;diff=7915&amp;oldid=prev</id>
		<title>V1KT0P: /* Перемещение */</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Ru:KeyValues_(SourceMod_Scripting)&amp;diff=7915&amp;oldid=prev"/>
		<updated>2010-12-25T04:48:25Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Перемещение&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 04:48, 25 December 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l33&quot; &gt;Line 33:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 33:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Стек перемещения&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Стек перемещения&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Поскольку структура KeyValues изначально рекурсивная (это дерево), ''стек перемещения'' используется для сохранения истории каждого ''перемещения'' (перемещение начинается рекурсивно погружаться в дерево, где текущий уровень вложенности углубляется на одну секцию).&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The &lt;/del&gt;''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;top&lt;/del&gt;'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;of this stack is where all operations take place&lt;/del&gt;.&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Поскольку структура KeyValues изначально рекурсивная (это дерево), ''стек перемещения'' используется для сохранения истории каждого ''перемещения'' (перемещение начинается рекурсивно погружаться в дерево, где текущий уровень вложенности углубляется на одну секцию).&amp;#160; ''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;верх&lt;/ins&gt;'' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;этого стека где все операции имеют место.&lt;/ins&gt;.&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;For example&lt;/del&gt;, &amp;lt;tt&amp;gt;KvJumpToKey&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;will attempt to find a sub&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;key under the current section&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;If it succeeds&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the position in the tree has changed by moving down one level&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and thus this position is pushed onto the traversal stack&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Now, operations such as &lt;/del&gt;&amp;lt;tt&amp;gt;KvGetString&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;will use this new position&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Например&lt;/ins&gt;, &amp;lt;tt&amp;gt;KvJumpToKey&amp;lt;/tt&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;будет пытаться найтим под&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ключ под текущим разделом&lt;/ins&gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;При успехе позиция в дереве изменяется перемещением вниз на один уровень&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;и&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;следовательно, эта позиция помещается в стек перемещения&lt;/ins&gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Теперь операции такие как &lt;/ins&gt;&amp;lt;tt&amp;gt;KvGetString&amp;lt;/tt&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;будут использовать эту новую позицию&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There are natives which change the position but do not change the traversal stack.&amp;#160; For example, &amp;lt;tt&amp;gt;KvGotoNextKey&amp;lt;/tt&amp;gt; will change the current section being viewed, but there are no push/pop operations to the traversal stack.&amp;#160; This is because the nesting level did not change; it advances to the next section at the same level, rather than finding a section a level deeper.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There are natives which change the position but do not change the traversal stack.&amp;#160; For example, &amp;lt;tt&amp;gt;KvGotoNextKey&amp;lt;/tt&amp;gt; will change the current section being viewed, but there are no push/pop operations to the traversal stack.&amp;#160; This is because the nesting level did not change; it advances to the next section at the same level, rather than finding a section a level deeper.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>V1KT0P</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Ru:KeyValues_(SourceMod_Scripting)&amp;diff=7914&amp;oldid=prev</id>
		<title>V1KT0P at 04:44, 25 December 2010</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Ru:KeyValues_(SourceMod_Scripting)&amp;diff=7914&amp;oldid=prev"/>
		<updated>2010-12-25T04:44:20Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 04:44, 25 December 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;KeyValues &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;are simple, tree-based structures used for storing nested sections containing key&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;value pairs&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Detailed information on &lt;/del&gt;KeyValues &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;can be seen at the &lt;/del&gt;[http://developer.valvesoftware.com/wiki/KeyValues_class Valve Developer Wiki].&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;KeyValues &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;это простая древовидная структура используемая для хранения вложенных разделов состоящих из пар ключ&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;значение&lt;/ins&gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Детальная информация про &lt;/ins&gt;KeyValues &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;может быть найдена на &lt;/ins&gt;[http://developer.valvesoftware.com/wiki/KeyValues_class Valve Developer Wiki].&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;All &lt;/del&gt;KeyValues &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;specific functions in this document are from &lt;/del&gt;&amp;lt;tt&amp;gt;public/include/keyvalues.inc&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Все &lt;/ins&gt;KeyValues &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;функции в этом документе находятся в &lt;/ins&gt;&amp;lt;tt&amp;gt;public/include/keyvalues.inc&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Введение=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Введение=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l14&quot; &gt;Line 14:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;KeyValues структуры создаются с помощью &amp;lt;tt&amp;gt;CreateKeyValues()&amp;lt;/tt&amp;gt;.&amp;#160; Handle должен быть освобожден после завершения работы для устранения утечки памяти.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;KeyValues структуры создаются с помощью &amp;lt;tt&amp;gt;CreateKeyValues()&amp;lt;/tt&amp;gt;.&amp;#160; Handle должен быть освобожден после завершения работы для устранения утечки памяти.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Files&lt;/del&gt;=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Файлы&lt;/ins&gt;=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;KeyValues &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;can be exported and imported via &lt;/del&gt;KeyValues &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;files&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;These files always consist of a root node and any number of sub&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;keys or sub-sections&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;For example, a file might look like this&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;KeyValues &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;могут быть экспортированы и импортированы с помощью &lt;/ins&gt;KeyValues &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;файлов&lt;/ins&gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Эти файлы всегда состоят из главного узла и множества под&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ключей или подразделов&lt;/ins&gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Например файл может выглядеть вот так&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&amp;quot;MyFile&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&amp;quot;MyFile&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l24&quot; &gt;Line 24:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 24:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;In this example, &lt;/del&gt;&amp;lt;tt&amp;gt;STEAM_0:0:7&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is a section under &lt;/del&gt;&amp;lt;tt&amp;gt;MyFile&amp;lt;/tt&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, the root node&lt;/del&gt;.&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;В этом примере &lt;/ins&gt;&amp;lt;tt&amp;gt;STEAM_0:0:7&amp;lt;/tt&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;это раздел под главным узлом &lt;/ins&gt;&amp;lt;tt&amp;gt;MyFile&amp;lt;/tt&amp;gt;.&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;To load &lt;/del&gt;KeyValues &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;from a file, use &lt;/del&gt;&amp;lt;tt&amp;gt;FileToKeyValues&amp;lt;/tt&amp;gt;&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;To save &lt;/del&gt;KeyValues &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;to a file, use &lt;/del&gt;&amp;lt;tt&amp;gt;KeyValuesFromFile&amp;lt;/tt&amp;gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;For both cases, you must already have a &lt;/del&gt;Handle &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;to a &lt;/del&gt;KeyValues &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;structure&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Для загрузки &lt;/ins&gt;KeyValues &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;из файла используйте &lt;/ins&gt;&amp;lt;tt&amp;gt;FileToKeyValues&amp;lt;/tt&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;. &lt;/ins&gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Для сохранения &lt;/ins&gt;KeyValues &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;в файл используйте &lt;/ins&gt;&amp;lt;tt&amp;gt;KeyValuesFromFile&amp;lt;/tt&amp;gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Для обоих случае вы всегда должны иметь &lt;/ins&gt;Handle &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ссылающийся на &lt;/ins&gt;KeyValues &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;структуру&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Traversal&lt;/del&gt;=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Перемещение&lt;/ins&gt;=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;SourceMod &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;provides natives for traversing over a &lt;/del&gt;KeyValues &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;structure&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;However, it is important to understand how this traversal works&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Internally&lt;/del&gt;, SourceMod &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;keeps track of two pieces of information&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;SourceMod &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;обеспечивает нативное перемещение по &lt;/ins&gt;KeyValues &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;структуре&lt;/ins&gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Однако очень важно понимать как происходит это перемещение&lt;/ins&gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Внутренне&lt;/ins&gt;, SourceMod &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;отслеживает из двух частей информации&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The root node&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Главный узел&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;A traversal stack&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Стек перемещения&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Since a &lt;/del&gt;KeyValues &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;structure is inherently recursive &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;it's a tree&lt;/del&gt;), &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the &lt;/del&gt;''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;traversal stack&lt;/del&gt;'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is used to save a history of each &lt;/del&gt;''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;traversal&lt;/del&gt;'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;made &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;a traversal being a recursive dive into the tree&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;where the current nesting level deepens by one section&lt;/del&gt;).&amp;#160; The ''top'' of this stack is where all operations take place.&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Поскольку структура &lt;/ins&gt;KeyValues &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;изначально рекурсивная &lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;это дерево&lt;/ins&gt;), ''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;стек перемещения&lt;/ins&gt;'' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;используется для сохранения истории каждого &lt;/ins&gt;''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;перемещения&lt;/ins&gt;'' (&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;перемещение начинается рекурсивно погружаться в дерево&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;где текущий уровень вложенности углубляется на одну секцию&lt;/ins&gt;).&amp;#160; The ''top'' of this stack is where all operations take place.&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For example, &amp;lt;tt&amp;gt;KvJumpToKey&amp;lt;/tt&amp;gt; will attempt to find a sub-key under the current section.&amp;#160; If it succeeds, the position in the tree has changed by moving down one level, and thus this position is pushed onto the traversal stack.&amp;#160; Now, operations such as &amp;lt;tt&amp;gt;KvGetString&amp;lt;/tt&amp;gt; will use this new position.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For example, &amp;lt;tt&amp;gt;KvJumpToKey&amp;lt;/tt&amp;gt; will attempt to find a sub-key under the current section.&amp;#160; If it succeeds, the position in the tree has changed by moving down one level, and thus this position is pushed onto the traversal stack.&amp;#160; Now, operations such as &amp;lt;tt&amp;gt;KvGetString&amp;lt;/tt&amp;gt; will use this new position.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>V1KT0P</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Ru:KeyValues_(SourceMod_Scripting)&amp;diff=7913&amp;oldid=prev</id>
		<title>V1KT0P: /* Introduction */</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Ru:KeyValues_(SourceMod_Scripting)&amp;diff=7913&amp;oldid=prev"/>
		<updated>2010-12-25T04:27:29Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Introduction&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 04:27, 25 December 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot; &gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;All KeyValues specific functions in this document are from &amp;lt;tt&amp;gt;public/include/keyvalues.inc&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;All KeyValues specific functions in this document are from &amp;lt;tt&amp;gt;public/include/keyvalues.inc&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Introduction&lt;/del&gt;=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Введение&lt;/ins&gt;=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;KeyValues &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;consist of a &lt;/del&gt;''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;nodes&lt;/del&gt;''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, or &lt;/del&gt;''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;sections&lt;/del&gt;'', &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;which contain pairs of keys and values&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;A section looks like this&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;KeyValues &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;состоит из &lt;/ins&gt;''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;узлов&lt;/ins&gt;'' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;и &lt;/ins&gt;''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;разделов&lt;/ins&gt;'', &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;которые содержат пары ключей и значений&lt;/ins&gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Разделы выглядят примерно так&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;section&lt;/del&gt;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;раздел&lt;/ins&gt;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;key&lt;/del&gt;&amp;quot;	&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;value&lt;/del&gt;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ключ&lt;/ins&gt;&amp;quot;	&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;значение&lt;/ins&gt;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The &lt;/del&gt;&amp;lt;tt&amp;gt;&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;section&lt;/del&gt;&amp;quot;&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;string denotes the section's name&lt;/del&gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The &lt;/del&gt;&amp;lt;tt&amp;gt;&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;key&lt;/del&gt;&amp;quot;&amp;lt;/tt&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;string is the key name, and the &lt;/del&gt;&amp;lt;tt&amp;gt;&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;value&lt;/del&gt;&amp;quot;&amp;lt;/tt&amp;gt;&amp;quot; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;string is the value&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Сторка &lt;/ins&gt;&amp;lt;tt&amp;gt;&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;раздел&lt;/ins&gt;&amp;quot;&amp;lt;/tt&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;является именем раздела&lt;/ins&gt;.&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Строка &lt;/ins&gt;&amp;lt;tt&amp;gt;&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ключ&lt;/ins&gt;&amp;quot;&amp;lt;/tt&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;это имя ключа и строка &lt;/ins&gt;&amp;lt;tt&amp;gt;&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;значение&lt;/ins&gt;&amp;quot;&amp;lt;/tt&amp;gt;&amp;quot; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;является значением&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;KeyValues &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;structures are created with &lt;/del&gt;&amp;lt;tt&amp;gt;CreateKeyValues()&amp;lt;/tt&amp;gt;.&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The &lt;/del&gt;Handle &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;must be freed when finished in order to avoid a memory leak&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;KeyValues &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;структуры создаются с помощью &lt;/ins&gt;&amp;lt;tt&amp;gt;CreateKeyValues()&amp;lt;/tt&amp;gt;.&amp;#160; Handle &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;должен быть освобожден после завершения работы для устранения утечки памяти&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Files=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Files=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>V1KT0P</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Ru:KeyValues_(SourceMod_Scripting)&amp;diff=6657&amp;oldid=prev</id>
		<title>Frenzzy at 10:35, 24 December 2008</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Ru:KeyValues_(SourceMod_Scripting)&amp;diff=6657&amp;oldid=prev"/>
		<updated>2008-12-24T10:35:23Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 10:35, 24 December 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l189&quot; &gt;Line 189:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 189:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;While at first this loop looks infinite, it is not.&amp;#160; If &amp;lt;tt&amp;gt;KvDeleteThis&amp;lt;/tt&amp;gt; fails to find a subsequent key, it will break out of the loop.&amp;#160; Similarly, if &amp;lt;tt&amp;gt;KvGotoNextKey&amp;lt;/tt&amp;gt; fails, the loop will end.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;While at first this loop looks infinite, it is not.&amp;#160; If &amp;lt;tt&amp;gt;KvDeleteThis&amp;lt;/tt&amp;gt; fails to find a subsequent key, it will break out of the loop.&amp;#160; Similarly, if &amp;lt;tt&amp;gt;KvGotoNextKey&amp;lt;/tt&amp;gt; fails, the loop will end.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:SourceMod Scripting&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;:Ru&lt;/ins&gt;:SourceMod Scripting]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[[Category:Russian&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Frenzzy</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Ru:KeyValues_(SourceMod_Scripting)&amp;diff=6619&amp;oldid=prev</id>
		<title>Frenzzy: New page: KeyValues are simple, tree-based structures used for storing nested sections containing key/value pairs.  Detailed information on KeyValues can be seen at the [http://developer.valvesoftwa...</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Ru:KeyValues_(SourceMod_Scripting)&amp;diff=6619&amp;oldid=prev"/>
		<updated>2008-12-23T16:23:19Z</updated>

		<summary type="html">&lt;p&gt;New page: KeyValues are simple, tree-based structures used for storing nested sections containing key/value pairs.  Detailed information on KeyValues can be seen at the [http://developer.valvesoftwa...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;KeyValues are simple, tree-based structures used for storing nested sections containing key/value pairs.  Detailed information on KeyValues can be seen at the [http://developer.valvesoftware.com/wiki/KeyValues_class Valve Developer Wiki].  &lt;br /&gt;
&lt;br /&gt;
All KeyValues specific functions in this document are from &amp;lt;tt&amp;gt;public/include/keyvalues.inc&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
KeyValues consist of a ''nodes'', or ''sections'', which contain pairs of keys and values.  A section looks like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;section&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;key&amp;quot;	&amp;quot;value&amp;quot;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;&amp;quot;section&amp;quot;&amp;lt;/tt&amp;gt; string denotes the section's name.  The &amp;lt;tt&amp;gt;&amp;quot;key&amp;quot;&amp;lt;/tt&amp;gt; string is the key name, and the &amp;lt;tt&amp;gt;&amp;quot;value&amp;quot;&amp;lt;/tt&amp;gt;&amp;quot; string is the value.&lt;br /&gt;
&lt;br /&gt;
KeyValues structures are created with &amp;lt;tt&amp;gt;CreateKeyValues()&amp;lt;/tt&amp;gt;.  The Handle must be freed when finished in order to avoid a memory leak.&lt;br /&gt;
&lt;br /&gt;
=Files=&lt;br /&gt;
KeyValues can be exported and imported via KeyValues files.  These files always consist of a root node and any number of sub-keys or sub-sections.  For example, a file might look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;MyFile&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;STEAM_0:0:7&amp;quot;&lt;br /&gt;
	{&lt;br /&gt;
		&amp;quot;name&amp;quot;		&amp;quot;crab&amp;quot;&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, &amp;lt;tt&amp;gt;STEAM_0:0:7&amp;lt;/tt&amp;gt; is a section under &amp;lt;tt&amp;gt;MyFile&amp;lt;/tt&amp;gt;, the root node.  &lt;br /&gt;
&lt;br /&gt;
To load KeyValues from a file, use &amp;lt;tt&amp;gt;FileToKeyValues&amp;lt;/tt&amp;gt;  To save KeyValues to a file, use &amp;lt;tt&amp;gt;KeyValuesFromFile&amp;lt;/tt&amp;gt;.  For both cases, you must already have a Handle to a KeyValues structure.&lt;br /&gt;
&lt;br /&gt;
=Traversal=&lt;br /&gt;
SourceMod provides natives for traversing over a KeyValues structure.  However, it is important to understand how this traversal works.  Internally, SourceMod keeps track of two pieces of information:&lt;br /&gt;
*The root node&lt;br /&gt;
*A traversal stack&lt;br /&gt;
&lt;br /&gt;
Since a KeyValues structure is inherently recursive (it's a tree), the ''traversal stack'' is used to save a history of each ''traversal'' made (a traversal being a recursive dive into the tree, where the current nesting level deepens by one section).  The ''top'' of this stack is where all operations take place.  &lt;br /&gt;
&lt;br /&gt;
For example, &amp;lt;tt&amp;gt;KvJumpToKey&amp;lt;/tt&amp;gt; will attempt to find a sub-key under the current section.  If it succeeds, the position in the tree has changed by moving down one level, and thus this position is pushed onto the traversal stack.  Now, operations such as &amp;lt;tt&amp;gt;KvGetString&amp;lt;/tt&amp;gt; will use this new position.&lt;br /&gt;
&lt;br /&gt;
There are natives which change the position but do not change the traversal stack.  For example, &amp;lt;tt&amp;gt;KvGotoNextKey&amp;lt;/tt&amp;gt; will change the current section being viewed, but there are no push/pop operations to the traversal stack.  This is because the nesting level did not change; it advances to the next section at the same level, rather than finding a section a level deeper.&lt;br /&gt;
&lt;br /&gt;
More traversal natives:&lt;br /&gt;
*&amp;lt;tt&amp;gt;KvGotoFirstSubKey&amp;lt;/tt&amp;gt; - Finds the first sub-section under the current section.  This pushes the section onto the traversal stack.&lt;br /&gt;
*&amp;lt;tt&amp;gt;KvGoBack&amp;lt;/tt&amp;gt; - Pops the traversal stack (moves up one level).&lt;br /&gt;
*&amp;lt;tt&amp;gt;KvRewind&amp;lt;/tt&amp;gt; - Clears the traversal stack so the current position is the root node.&lt;br /&gt;
&lt;br /&gt;
==Basic Lookup==&lt;br /&gt;
Let's take our &amp;lt;tt&amp;gt;MyFile&amp;lt;/tt&amp;gt; example from above.  How could we retrieve the name &amp;quot;crab&amp;quot; given the Steam ID?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;bool:GetNameFromSteamID(const String:steamid[], String:name[], maxlength)&lt;br /&gt;
{&lt;br /&gt;
	new Handle:kv = CreateKeyValues(&amp;quot;MyFile&amp;quot;);&lt;br /&gt;
	FileToKeyValues(kv, &amp;quot;myfile.txt&amp;quot;);&lt;br /&gt;
	if (!KvJumpToKey(kv, steamid))&lt;br /&gt;
	{&lt;br /&gt;
		return false;&lt;br /&gt;
	}&lt;br /&gt;
	KvGetString(kv, &amp;quot;name&amp;quot;, name, maxlength);&lt;br /&gt;
	CloseHandle(kv);&lt;br /&gt;
	return true;&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' &amp;lt;tt&amp;gt;KvJumpToKey&amp;lt;/tt&amp;gt; is a traversal native that changes the nesting level of the traversal stack.  However, &amp;lt;tt&amp;gt;CloseHandle&amp;lt;/tt&amp;gt; will not accidentally close only the current level of the KeyValues structure.  It will close the entire thing.&lt;br /&gt;
&lt;br /&gt;
==Iterative Lookup==&lt;br /&gt;
Let's modify our previous example to use iteration.  This has the same functionality, but demonstrates how to browse over many sections.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;bool:GetNameFromSteamID(const String:steamid[], String:name[], maxlength)&lt;br /&gt;
{&lt;br /&gt;
	new Handle:kv = CreateKeyValues(&amp;quot;MyFile&amp;quot;);&lt;br /&gt;
	FileToKeyValues(kv, &amp;quot;myfile.txt&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
	if (!KvGotoFirstSubKey(kv))&lt;br /&gt;
	{&lt;br /&gt;
		return false;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	decl String:buffer[255];&lt;br /&gt;
	do&lt;br /&gt;
	{&lt;br /&gt;
		KvGetSectionName(kv, buffer, sizeof(buffer));&lt;br /&gt;
		if (StrEqual(buffer, steamid))&lt;br /&gt;
		{&lt;br /&gt;
			KvGetString(kv, &amp;quot;name&amp;quot;, name, maxlength);&lt;br /&gt;
			CloseHandle(kv);&lt;br /&gt;
			return true;&lt;br /&gt;
		}&lt;br /&gt;
	} while (KvGotoNextKey(kv));&lt;br /&gt;
&lt;br /&gt;
	CloseHandle(kv)&lt;br /&gt;
	return false&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' In this example, note that &amp;lt;tt&amp;gt;KvGotoNextKey&amp;lt;/tt&amp;gt; is an iterative function, not a traversal one.  Since it does not change the nesting level, we don't need to call &amp;lt;tt&amp;gt;KvGoBack&amp;lt;/tt&amp;gt; to return and continue iterating.&lt;br /&gt;
&lt;br /&gt;
==Full Traversal==&lt;br /&gt;
Let's say we wanted to browse every section of a KeyValues file.  An example of this might look like:&lt;br /&gt;
&amp;lt;pawn&amp;gt;BrowseKeyValues(Handle:kv)&lt;br /&gt;
{&lt;br /&gt;
	do&lt;br /&gt;
	{&lt;br /&gt;
		if (KvGotoFirstSubKey(kv))&lt;br /&gt;
		{&lt;br /&gt;
			BrowseKeyValues(kv);&lt;br /&gt;
			KvGoBack(kv);&lt;br /&gt;
		}&lt;br /&gt;
	} while (KvGotoNextKey(kv));&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function will browse an entire KeyValues structure.  Note that every successful call to &amp;lt;tt&amp;gt;KvGotoFirstSubKey&amp;lt;/tt&amp;gt; is paired with a call to &amp;lt;tt&amp;gt;KvGoBack&amp;lt;/tt&amp;gt;.  This is because the former pushes onto the traversal stack.  We must pop the position off so we can continue browsing from our old position.&lt;br /&gt;
&lt;br /&gt;
=Deletion=&lt;br /&gt;
There are two ways to delete sections from a KeyValues structure:&lt;br /&gt;
*&amp;lt;tt&amp;gt;KvDeleteKey&amp;lt;/tt&amp;gt; - Safely removes a named sub-section and any of its child sections/keys.&lt;br /&gt;
*&amp;lt;tt&amp;gt;KvDeleteThis&amp;lt;/tt&amp;gt; - Safely removes the current position if possible.&lt;br /&gt;
&lt;br /&gt;
==Simple Deletion==&lt;br /&gt;
First, let's use our &amp;quot;basic lookup&amp;quot; example to delete a Steam ID section:&lt;br /&gt;
&amp;lt;pawn&amp;gt;RemoveSteamID(const String:steamid[])&lt;br /&gt;
{&lt;br /&gt;
	new Handle:kv = CreateKeyValues(&amp;quot;MyFile&amp;quot;)&lt;br /&gt;
	FileToKeyValues(kv, &amp;quot;myfile.txt&amp;quot;)&lt;br /&gt;
	if (!KvGotoFirstSubKey(kv))&lt;br /&gt;
	{&lt;br /&gt;
		return&lt;br /&gt;
	}&lt;br /&gt;
	KvDeleteKey(kv, steamid)&lt;br /&gt;
	KvRewind(kv)&lt;br /&gt;
	KeyValuesToFile(kv, &amp;quot;myfile.txt&amp;quot;)&lt;br /&gt;
	CloseHandle(kv)&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' We called &amp;lt;tt&amp;gt;KvRewind&amp;lt;/tt&amp;gt; so the file would be dumped from the root position, instead of the current one.  &lt;br /&gt;
&lt;br /&gt;
==Iterative Deletion==&lt;br /&gt;
Likewise, let's show how our earlier iterative example could be adapted for deleting a section.  For this we can use &amp;lt;tt&amp;gt;KvDeleteThis&amp;lt;/tt&amp;gt;, which deletes the current position from the previous position in the traversal stack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;RemoveSteamID(const String:steamid[])&lt;br /&gt;
{&lt;br /&gt;
	new Handle:kv = CreateKeyValues(&amp;quot;MyFile&amp;quot;)&lt;br /&gt;
	FileToKeyValues(kv, &amp;quot;myfile.txt&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	if (!KvGotoFirstSubKey(kv))&lt;br /&gt;
	{&lt;br /&gt;
		return&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	decl String:buffer[255]&lt;br /&gt;
	do&lt;br /&gt;
	{&lt;br /&gt;
		KvGetSectionName(kv, buffer, sizeof(buffer))&lt;br /&gt;
		if (StrEqual(buffer, steamid))&lt;br /&gt;
		{&lt;br /&gt;
			KvDeleteThis(kv)&lt;br /&gt;
			CloseHandle(kv)&lt;br /&gt;
			return&lt;br /&gt;
		}&lt;br /&gt;
	} while (KvGotoNextKey(kv))&lt;br /&gt;
&lt;br /&gt;
	CloseHandle(kv)&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Full Deletion==&lt;br /&gt;
Lastly, let's take a look at how we would delete all (or some) keys.  &amp;lt;tt&amp;gt;KvDeleteThis&amp;lt;/tt&amp;gt; has the special property that it can act as an automatic iterator.  When it deletes a key, it automatically attempts to advance to the next one, as &amp;lt;tt&amp;gt;KvGotoNextKey&amp;lt;/tt&amp;gt; would.  If it can't find any more keys, it simply pops the traversal stack.  &lt;br /&gt;
&lt;br /&gt;
An example of deleting all SteamIDs that have blank names:&lt;br /&gt;
&amp;lt;pawn&amp;gt;DeleteAll(Handle:kv)&lt;br /&gt;
{&lt;br /&gt;
	if (!KvGotoFirstSubKey(kv))&lt;br /&gt;
	{&lt;br /&gt;
		return&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	for (;;)&lt;br /&gt;
	{&lt;br /&gt;
		decl String:name[4]&lt;br /&gt;
		KvGetString(kv, name, sizeof(name))&lt;br /&gt;
		if (name[0] == '\0')&lt;br /&gt;
		{&lt;br /&gt;
			if (KvDeleteThis(kv) &amp;lt; 1)&lt;br /&gt;
			{&lt;br /&gt;
				break&lt;br /&gt;
			}&lt;br /&gt;
		} else if (!KvGotoNextKey(kv)) {&lt;br /&gt;
			break&lt;br /&gt;
		}	&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While at first this loop looks infinite, it is not.  If &amp;lt;tt&amp;gt;KvDeleteThis&amp;lt;/tt&amp;gt; fails to find a subsequent key, it will break out of the loop.  Similarly, if &amp;lt;tt&amp;gt;KvGotoNextKey&amp;lt;/tt&amp;gt; fails, the loop will end.&lt;br /&gt;
&lt;br /&gt;
[[Category:SourceMod Scripting]]&lt;br /&gt;
[[Category:Russian]]&lt;/div&gt;</summary>
		<author><name>Frenzzy</name></author>
		
	</entry>
</feed>