<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.kolmafia.us/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=RogerMexico</id>
	<title>Kolmafia - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kolmafia.us/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=RogerMexico"/>
	<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Special:Contributions/RogerMexico"/>
	<updated>2026-04-25T02:21:20Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Use_familiar&amp;diff=5017</id>
		<title>Use familiar</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Use_familiar&amp;diff=5017"/>
		<updated>2010-09-26T13:29:45Z</updated>

		<summary type="html">&lt;p&gt;RogerMexico: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{&lt;br /&gt;
#vardefine:name|use_familiar}}{{&lt;br /&gt;
#vardefine:return_type|boolean}}{{&lt;br /&gt;
&lt;br /&gt;
FunctionPage|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
&lt;br /&gt;
function1={{Function|&lt;br /&gt;
name={{#var:name}}|&lt;br /&gt;
aggregate={{#var:aggregate}}|&lt;br /&gt;
return_type={{#var:return_type}}|&lt;br /&gt;
return_also={{#var:return_also}}|&lt;br /&gt;
parameter1={{Param|familiar|buddy}}|&lt;br /&gt;
p1desc={{Pspan|buddy}} is the familiar to equip|&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
function_description=Switches your current familiar for the the  familiar {{pspan|buddy}} specified. Returns true if the specified familiar {{pspan|buddy}} is your current familiar after the function&#039;s completion (so it will return true if you try to switch to your current familiar).|&lt;br /&gt;
&lt;br /&gt;
needscode=yes|&lt;br /&gt;
&lt;br /&gt;
code1={{CodeSample|&lt;br /&gt;
title=Code Sample|&lt;br /&gt;
&lt;br /&gt;
code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
use_familiar( $familiar [Cocoabo]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}|&lt;br /&gt;
&lt;br /&gt;
see_also={{SeeAlso|have_familiar}}|&lt;br /&gt;
cli_equiv=The CLI command &amp;quot;familiar&amp;quot; has the same function when a familiar type is specified as the only parameter.|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Equipment]]&lt;/div&gt;</summary>
		<author><name>RogerMexico</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Use_familiar&amp;diff=5999</id>
		<title>Talk:Use familiar</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Use_familiar&amp;diff=5999"/>
		<updated>2010-09-26T13:26:17Z</updated>

		<summary type="html">&lt;p&gt;RogerMexico: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This always seems to return false for me, can anyone confirm?&amp;lt;br /&amp;gt;&lt;br /&gt;
--[[User:Slyz|Slyz]] 20:56, 9 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: &amp;gt; ash use_familiar($familiar[sandworm])&lt;br /&gt;
&lt;br /&gt;
: Putting Mexicana the Hovering Sombrero back into terrarium...&amp;lt;br /&amp;gt;&lt;br /&gt;
: Taking Hecho en Mexico the Baby Sandworm out of terrarium...&amp;lt;br /&amp;gt;&lt;br /&gt;
: Returned: true&amp;lt;br /&amp;gt;&lt;br /&gt;
I assume that the ash command should be enough to check return value; correct me if I&#039;m wrong. --[[User:Heeheehee|Heeheehee]] 21:03, 9 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I&#039;ll have to recheck after RO, but here is what I was getting (doing things slightly differently):&lt;br /&gt;
&lt;br /&gt;
: &amp;gt; ash print( use_familiar($familiar[slimeling]) )&lt;br /&gt;
&lt;br /&gt;
: Putting Dusty the Baby Sandworm back into terrarium...&amp;lt;br /&amp;gt;&lt;br /&gt;
: Taking Yuk the Slimeling out of terrarium...&amp;lt;br /&amp;gt;&lt;br /&gt;
: false&amp;lt;br /&amp;gt;&lt;br /&gt;
: Returned: void&amp;lt;br /&amp;gt;&lt;br /&gt;
--[[User:Slyz|Slyz]] 03:33, 10 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Huh. Using that method, I get:&lt;br /&gt;
: &amp;gt; ash print( use_familiar($familiar[sombrero]) )&lt;br /&gt;
&lt;br /&gt;
: Putting Hecho en Mexico the Baby Sandworm back into terrarium...&amp;lt;br /&amp;gt;&lt;br /&gt;
: Taking Mexicana the Hovering Sombrero out of terrarium...&amp;lt;br /&amp;gt;&lt;br /&gt;
: true&amp;lt;br /&amp;gt;&lt;br /&gt;
: Returned: void&lt;br /&gt;
--[[User:Heeheehee|Heeheehee]] 07:51, 10 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I&#039;m also seeing expected behavior; true most of the time, false if I try a familiar I don&#039;t have.&lt;br /&gt;
--[[User:StDoodle|StDoodle (#1059825)]] 14:52, 10 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I find the syntax as described on this page confusing. With other functions I do not have to specify the datatype, for example:&amp;lt;br/&amp;gt;&lt;br /&gt;
outfit($string[Backup]);&amp;lt;br/&amp;gt;&lt;br /&gt;
outfit(&amp;quot;Backup&amp;quot;);&amp;lt;br/&amp;gt;&lt;br /&gt;
both work identically. However, use_familiar(&amp;quot;hobo&amp;quot;);&amp;lt;br/&amp;gt;&lt;br /&gt;
returns the error &amp;quot;Function &#039;use_familiar( string )&#039; undefined...&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
This just happened to be the first function I looked up on this wiki, and if the discussion with examples had not been here, I don&#039;t think I would have worked it out at all.--[[User:RogerMexico|RogerMexico]] 12:04, 25 September 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
By default, supplying something inside of quotes is considered of the &amp;quot;string&amp;quot; datatype. So, $string[hello] is the same as &amp;quot;hello&amp;quot;. However, use_familiar() needs the familiar datatype. You can&#039;t just supply a string (ie &amp;quot;hobo&amp;quot;); you need to supply a familiar. Since datatypes like familiar, element, etc. aren&#039;t &amp;quot;normal&amp;quot; datatypes used in programming, we have to use an explicit datatype constant call (the dollar-sign thing) or a function that converts from a string to that datatype. --[[User:StDoodle|StDoodle (#1059825)]] 18:42, 25 September 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I&#039;ve done some further reading on this wiki (which is absolutely superb documentation by the way) and came to understand &#039;&#039;why&#039;&#039; it is that way. But for non-programmers like myself who are looking for a quick answer, I think an example on the page would help. I&#039;ll try adding one, hope I don&#039;t screw it up :) Oh, and is there a page that discusses syntax in general? The whole reason I went and looked at the outfit() function was to try and understand the syntax of the function (specifically, why is the word familiar inside the parentheses there?).The datatype page was helpful, I think something like that on syntax would be nice. --[[User:RogerMexico|RogerMexico]] 13:26, 26 September 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>RogerMexico</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Talk:Use_familiar&amp;diff=5997</id>
		<title>Talk:Use familiar</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Talk:Use_familiar&amp;diff=5997"/>
		<updated>2010-09-25T12:04:01Z</updated>

		<summary type="html">&lt;p&gt;RogerMexico: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This always seems to return false for me, can anyone confirm?&amp;lt;br /&amp;gt;&lt;br /&gt;
--[[User:Slyz|Slyz]] 20:56, 9 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: &amp;gt; ash use_familiar($familiar[sandworm])&lt;br /&gt;
&lt;br /&gt;
: Putting Mexicana the Hovering Sombrero back into terrarium...&amp;lt;br /&amp;gt;&lt;br /&gt;
: Taking Hecho en Mexico the Baby Sandworm out of terrarium...&amp;lt;br /&amp;gt;&lt;br /&gt;
: Returned: true&amp;lt;br /&amp;gt;&lt;br /&gt;
I assume that the ash command should be enough to check return value; correct me if I&#039;m wrong. --[[User:Heeheehee|Heeheehee]] 21:03, 9 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I&#039;ll have to recheck after RO, but here is what I was getting (doing things slightly differently):&lt;br /&gt;
&lt;br /&gt;
: &amp;gt; ash print( use_familiar($familiar[slimeling]) )&lt;br /&gt;
&lt;br /&gt;
: Putting Dusty the Baby Sandworm back into terrarium...&amp;lt;br /&amp;gt;&lt;br /&gt;
: Taking Yuk the Slimeling out of terrarium...&amp;lt;br /&amp;gt;&lt;br /&gt;
: false&amp;lt;br /&amp;gt;&lt;br /&gt;
: Returned: void&amp;lt;br /&amp;gt;&lt;br /&gt;
--[[User:Slyz|Slyz]] 03:33, 10 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Huh. Using that method, I get:&lt;br /&gt;
: &amp;gt; ash print( use_familiar($familiar[sombrero]) )&lt;br /&gt;
&lt;br /&gt;
: Putting Hecho en Mexico the Baby Sandworm back into terrarium...&amp;lt;br /&amp;gt;&lt;br /&gt;
: Taking Mexicana the Hovering Sombrero out of terrarium...&amp;lt;br /&amp;gt;&lt;br /&gt;
: true&amp;lt;br /&amp;gt;&lt;br /&gt;
: Returned: void&lt;br /&gt;
--[[User:Heeheehee|Heeheehee]] 07:51, 10 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I&#039;m also seeing expected behavior; true most of the time, false if I try a familiar I don&#039;t have.&lt;br /&gt;
--[[User:StDoodle|StDoodle (#1059825)]] 14:52, 10 April 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I find the syntax as described on this page confusing. With other functions I do not have to specify the datatype, for example:&amp;lt;br/&amp;gt;&lt;br /&gt;
outfit($string[Backup]);&amp;lt;br/&amp;gt;&lt;br /&gt;
outfit(&amp;quot;Backup&amp;quot;);&amp;lt;br/&amp;gt;&lt;br /&gt;
both work identically. However, use_familiar(&amp;quot;hobo&amp;quot;);&amp;lt;br/&amp;gt;&lt;br /&gt;
returns the error &amp;quot;Function &#039;use_familiar( string )&#039; undefined...&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
This just happened to be the first function I looked up on this wiki, and if the discussion with examples had not been here, I don&#039;t think I would have worked it out at all.--[[User:RogerMexico|RogerMexico]] 12:04, 25 September 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>RogerMexico</name></author>
	</entry>
</feed>