<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>StateName</title><revhistory><revision><revnumber>3</revnumber><date>2015-09-07 22:37:25</date><authorinitials>Inanna</authorinitials></revision><revision><revnumber>2</revnumber><date>2015-09-07 22:37:10</date><authorinitials>Inanna</authorinitials></revision><revision><revnumber>1</revnumber><date>2015-09-07 22:36:22</date><authorinitials>Inanna</authorinitials></revision></revhistory></articleinfo><informaltable><tgroup cols="2"><colspec colname="col_0"/><colspec colname="col_1"/><tbody><row rowsep="1"><entry colsep="1" rowsep="1"><para>Usage: </para></entry><entry colsep="1" rowsep="1"><para>StateName(x) </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>Example: </para></entry><entry colsep="1" rowsep="1"><para>StateName(3)</para><para>StateName(GetDetailInfo(&quot;123,456&quot;).state) </para></entry></row></tbody></tgroup></informaltable><para>This function converts the numeric status (ie - peace, truce, holiday) to a named one. </para><para>Some examples: </para><itemizedlist><listitem override="none"><screen><![CDATA[// returns "truce"
echo StateName(2) 
]]><![CDATA[
Results:
18:29:26 truce
18:29:27 Script stopped]]></screen></listitem><listitem override="none"><screen><![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)
]]><![CDATA[
Results:
15:58:26 (City) - 1
15:58:27 (City) - peace
15:58:28 (City) - Script stopped]]></screen></listitem></itemizedlist><!--rule (<hr>) is not applicable to DocBook--><para> <ulink url="http://guide.neatportal.com/wiki/StateName/wiki/CategoryFunctions#">CategoryFunctions</ulink> </para></article>