• My Pages
  • Comments
  • Add Link
  • Subscribe
  • Subscribe User
  • Edit (GUI)
  • Edit (Text)
  • Rename Page
  • Copy Page
  • Load Page
  • Save Page
  • Delete Page
  • Attachments
  • Check Spelling
  • Diffs
  • Info
  • Revert to this revision
  • XML
  • Render as Docbook
  • Print View
  • Raw Text
  • Delete Cache
  • Like Pages
  • Local Site Map
  • Remove Spam
  • Package Pages
  • Sync Pages
    • Diff for "StateName"
    Differences between revisions 2 and 3
    Revision 2 as of 2015-09-07 22:37:10
    Size: 1172
    Editor: Inanna
    Comment:
    Revision 3 as of 2015-09-07 22:37:25
    Size: 1190
    Editor: Inanna
    Comment:
    Deletions are marked like this. Additions are marked like this.
    Line 2: Line 2:
    ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">!StateName(!GetDetailInfo("123,456").state) || ||<#F2F2F2 style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em; ">Example: ||<style="border-style:solid;border-color:rgb(170, 170, 170);padding:0.2em;">StateName(3)<<BR>>!StateName(!GetDetailInfo("123,456").state) ||

    Usage:

    StateName(x)

    Example:

    StateName(3)
    StateName(GetDetailInfo("123,456").state)

    This function converts the numeric status (ie - peace, truce, holiday) to a named one.

    Some examples:

    • // returns "truce"
      echo StateName(2) 
      
      Results:
      18:29:26 truce
      18:29:27 Script stopped
    • // 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


    CategoryFunctions

    StateName (last edited 2015-09-07 22:37:25 by Inanna)