<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.wlabsocks.com/wiki/index.php?action=history&amp;feed=atom&amp;title=GetClanVariable</id>
	<title>GetClanVariable - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://www.wlabsocks.com/wiki/index.php?action=history&amp;feed=atom&amp;title=GetClanVariable"/>
	<link rel="alternate" type="text/html" href="http://www.wlabsocks.com/wiki/index.php?title=GetClanVariable&amp;action=history"/>
	<updated>2026-05-12T22:16:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>http://www.wlabsocks.com/wiki/index.php?title=GetClanVariable&amp;diff=1221&amp;oldid=prev</id>
		<title>Tayfunwiki: Created page with &quot;= &lt;code&gt;GetVariable&lt;/code&gt; Method Documentation =  == Description == The &lt;code&gt;GetVariable&lt;/code&gt; methods allow for retrieving a private variable from a clan based on its name or ID. These methods come in two variants: a non-generic version that returns the variable as a base type, and a generic version that returns the variable cast to a specified type.  == Method Signatures ==  === GetVariable (Non-Generic) === &lt;syntaxhighlight lang=&quot;c#&quot;&gt; public NVar GetVariable(string...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.wlabsocks.com/wiki/index.php?title=GetClanVariable&amp;diff=1221&amp;oldid=prev"/>
		<updated>2024-08-04T16:17:19Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= &amp;lt;code&amp;gt;GetVariable&amp;lt;/code&amp;gt; Method Documentation =  == Description == The &amp;lt;code&amp;gt;GetVariable&amp;lt;/code&amp;gt; methods allow for retrieving a private variable from a clan based on its name or ID. These methods come in two variants: a non-generic version that returns the variable as a base type, and a generic version that returns the variable cast to a specified type.  == Method Signatures ==  === GetVariable (Non-Generic) === &amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt; public NVar GetVariable(string...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= &amp;lt;code&amp;gt;GetVariable&amp;lt;/code&amp;gt; Method Documentation =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The &amp;lt;code&amp;gt;GetVariable&amp;lt;/code&amp;gt; methods allow for retrieving a private variable from a clan based on its name or ID. These methods come in two variants: a non-generic version that returns the variable as a base type, and a generic version that returns the variable cast to a specified type.&lt;br /&gt;
&lt;br /&gt;
== Method Signatures ==&lt;br /&gt;
&lt;br /&gt;
=== GetVariable (Non-Generic) ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
public NVar GetVariable(string variableNameOrId)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This method retrieves the variable with the specified name or ID from the clan. It returns the variable as an &amp;lt;code&amp;gt;NVar&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== GetVariable (Generic) ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
public T GetVariable&amp;lt;T&amp;gt;(string variableNameOrId) where T : NVar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This method retrieves the variable with the specified name or ID from the clan and casts it to the specified type &amp;lt;code&amp;gt;T&amp;lt;/code&amp;gt;. It returns the variable as &amp;lt;code&amp;gt;T&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Example Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Non-Generic Usage ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
NVar variable = IM.Player.Clan.GetVariable(&amp;quot;someVariable&amp;quot;);&lt;br /&gt;
Debug.Log(variable.Value);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Retrieves the variable &amp;lt;code&amp;gt;someVariable&amp;lt;/code&amp;gt; and logs its value.&lt;br /&gt;
&lt;br /&gt;
=== Generic Usage ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
NBool booleanVar = IM.Player.Clan.GetVariable&amp;lt;NBool&amp;gt;(&amp;quot;booleanVariable&amp;quot;);&lt;br /&gt;
Debug.Log(booleanVar.Value);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Retrieves the variable &amp;lt;code&amp;gt;booleanVariable&amp;lt;/code&amp;gt; and casts it to an &amp;lt;code&amp;gt;NBool&amp;lt;/code&amp;gt; type. The &amp;lt;code&amp;gt;booleanVar.Value&amp;lt;/code&amp;gt; property returns the value as a &amp;lt;code&amp;gt;bool&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Note''': &amp;lt;code&amp;gt;booleanVar.Value&amp;lt;/code&amp;gt; will return the value as a boolean type (&amp;lt;code&amp;gt;bool&amp;lt;/code&amp;gt;).&lt;/div&gt;</summary>
		<author><name>Tayfunwiki</name></author>
	</entry>
</feed>