Thread Tools
Old January 6, 2001, 23:01   #1
Radical_Manuvr
Chieftain
 
Local Time: 09:48
Local Date: October 31, 2010
Join Date: Dec 2000
Location: Maryland, USA
Posts: 80
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.

Radical_Manuvr is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:48.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team