<?xml version="1.0" encoding="utf-8"?>
<s1 title="StateName"><table><strong class="highlight"><![CDATA[]]></strong><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Usage: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>StateName(x) </p>
</td></tr><tr><td><strong class="highlight"><![CDATA[]]></strong><p>Example: </p>
</td><td><strong class="highlight"><![CDATA[]]></strong><p>StateName(3)<br/>
StateName(GetDetailInfo(&quot;123,456&quot;).state) </p>
</td></tr></table><p>This function converts the numeric status (ie - peace, truce, holiday) to a named one. </p>
<p>Some examples: </p>
<ul><li><source><![CDATA[// returns "truce"
echo StateName(2) 

Results:
18:29:26 truce
18:29:27 Script stopped]]></source></li>
<li><source><![CDATA[// this finds the status of the city/valley at coordinates 123,456 and converts it into a word ("peace")
echo GetDetailInfo("123.456").state
echo StateName(GetDetailInfo("123,456").state)

Results:
15:58:26 (City) - 1
15:58:27 (City) - peace
15:58:28 (City) - Script stopped]]></source></li>
</ul>
<p></p>

<br/>------------------------------------------------------------------------------<br/>
<p> <jump href="/wiki/CategoryFunctions">CategoryFunctions</jump> </p>
</s1>