Announcement

Collapse
No announcement yet.

How to determine government type in SLIC

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to determine government type in SLIC

    I've been trying to use the following line in a SLIC file

    if (player[0].govttype == "GOVERNMENT_MONARCHY") {

    According to the SLIC Built in variable type page on this site player.govttype should be available but when I add this line to my code (along with the correctly placed } ) and load the scenario I crash with a syntax error message for that line.

    I also tried

    if (player[0].govttype == "Monarchy") {

    with the same error.

    I think I need to have something like

    tmpGovtype = player[0].govttype;
    if (tmpGovtype == "Monarchy") {

    or

    tmpGovtype = player[0].govttype;
    tmpGovtype2 = "Monarchy";
    if (tmpGovtype == tmpGovtype2) {

    but I don't know how to declare a string variable in SLIC. I looked though a lot of files but didn't see any used. Maybe I missed it, you can't do it, or there is another way to do this.

    Please help if you can! Thanks.

Working...
X