Omeletter Posted October 3, 2009 Share Posted October 3, 2009 So, I want to object to dissapear from 6 to 22 game time, but nothing happens! I use this script, scn SSOSamTableNightScript begin GameMode if ( GameHour > 6 ) && ( GameHour < 22 ) SSOFireCandleRef.disable SSONoFireCandleRef.enable endif endIf else SSONoFireCandleRef.disable SSOFireCandleRef.enable endif endIf endif end What's wrong? Nothing happens! I tick initially disabled, and persistent reference, and named candles like they should be, please help! Link to comment Share on other sites More sharing options...
Pronam Posted October 3, 2009 Share Posted October 3, 2009 Hm, why all those endifs?Actually, when you use else...or elseif, you would only need 1.My style is like this, that way you can always see if they are too sufficient or not.begin GameMode if ( GameHour > 6 ) && ( GameHour < 22 ) SSOFireCandleRef.disable SSONoFireCandleRef.enable endif endIf else SSONoFireCandleRef.disable SSOFireCandleRef.enable endif endIf endif endbegin GameMode if ( GameHour > 6 ) && ( GameHour < 22 ) SSOFireCandleRef.disable SSONoFireCandleRef.enable else SSONoFireCandleRef.disable SSOFireCandleRef.enable endif end It is explained here, linkanother note, if it isn't working.. try removing the else and replacing it with Gamehour < 6 || Gamehour > 22begin GameMode if ( GameHour > 6 ) && ( GameHour < 22 ) SSOFireCandleRef.disable SSONoFireCandleRef.enable elseif ( Gamehour < 6 ) || ( Gamehour > 22 ) SSONoFireCandleRef.disable SSOFireCandleRef.enable endif end Link to comment Share on other sites More sharing options...
Omeletter Posted October 3, 2009 Author Share Posted October 3, 2009 Thank you! Kudos Link to comment Share on other sites More sharing options...
Recommended Posts