<?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=SetClanVariable</id>
	<title>SetClanVariable - 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=SetClanVariable"/>
	<link rel="alternate" type="text/html" href="http://www.wlabsocks.com/wiki/index.php?title=SetClanVariable&amp;action=history"/>
	<updated>2026-05-12T22:54:05Z</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=SetClanVariable&amp;diff=1219&amp;oldid=prev</id>
		<title>Tayfunwiki: Created page with &quot;= &lt;code&gt;SetVariable&lt;/code&gt; Method Documentation =  == Description == The &lt;code&gt;SetVariable&lt;/code&gt; methods allow for setting the value of a private variable within a clan. These methods come in two variants: a non-generic version that simply sets the value, and a generic version that sets the value and returns it cast to a specified type.  == Method Signatures ==  === SetVariable (Non-Generic) === &lt;syntaxhighlight lang=&quot;c#&quot;&gt; public void SetVariable(string variableNameOrId...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.wlabsocks.com/wiki/index.php?title=SetClanVariable&amp;diff=1219&amp;oldid=prev"/>
		<updated>2024-08-04T16:14:08Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= &amp;lt;code&amp;gt;SetVariable&amp;lt;/code&amp;gt; Method Documentation =  == Description == The &amp;lt;code&amp;gt;SetVariable&amp;lt;/code&amp;gt; methods allow for setting the value of a private variable within a clan. These methods come in two variants: a non-generic version that simply sets the value, and a generic version that sets the value and returns it cast to a specified type.  == Method Signatures ==  === SetVariable (Non-Generic) === &amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt; public void SetVariable(string variableNameOrId...&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;SetVariable&amp;lt;/code&amp;gt; Method Documentation =&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The &amp;lt;code&amp;gt;SetVariable&amp;lt;/code&amp;gt; methods allow for setting the value of a private variable within a clan. These methods come in two variants: a non-generic version that simply sets the value, and a generic version that sets the value and returns it cast to a specified type.&lt;br /&gt;
&lt;br /&gt;
== Method Signatures ==&lt;br /&gt;
&lt;br /&gt;
=== SetVariable (Non-Generic) ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
public void SetVariable(string variableNameOrId, object value)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This method sets the value of a specified variable without returning it. If the variable does not exist, no action is taken.&lt;br /&gt;
&lt;br /&gt;
=== SetVariable (Generic) ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
public T SetVariable&amp;lt;T&amp;gt;(string variableNameOrId, object value) where T : NVar&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This method sets the value of a specified variable and returns the updated variable cast to the specified type &amp;lt;code&amp;gt;T&amp;lt;/code&amp;gt;. If the variable does not exist, it returns &amp;lt;code&amp;gt;null&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;
IM.Player.Clan.SetVariable(&amp;quot;booleanVariable&amp;quot;, true);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Sets the value of the variable &amp;lt;code&amp;gt;booleanVariable&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; for the player's clan.&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;
var booleanVar = IM.Player.Clan.SetVariable&amp;lt;NBool&amp;gt;(&amp;quot;booleanVariable&amp;quot;, true);&lt;br /&gt;
Debug.Log(booleanVar.Value);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Sets the value of the variable &amp;lt;code&amp;gt;booleanVariable&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; and retrieves it as 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>