Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 03-21-2012, 04:35 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Quote:
Originally Posted by Smokeynz View Post
indexnm = list.FindIndex(r => r.shortName.Equals("bob"));
You will get nothing:
Equals compares the complete string, you should use Contains(..).
Reply With Quote
  #2  
Old 03-21-2012, 09:28 AM
Smokeynz Smokeynz is offline
Approved Member
 
Join Date: Apr 2011
Posts: 106
Default

Oddly, it works

this is an example, but I am pulling and passing a number of things now

some declarations
Code:
bool timeIO;// = true; //time indicator switch on/off
double timevalue;
double timeindicator;
after I grab data from external text file configlists
i then find the data, and parse to game
Code:
idxIO = ConfigList.FindIndex(r => r.ConfigName.Equals("timeIO"));
idxTV = ConfigList.FindIndex(s => s.ConfigName.Equals("timevalue"));
double.TryParse(ConfigList[idxTV].ConfigValue, out timevalue);
timeIO is set as "ON" or "OFF" in config.
Im trying to set as realtime update, the only bit not working. at the moment it loads on start and stop of mission.

Code:
 timeIO = (ConfigList[idxIO].ConfigValue == "ON" ? true : false);        
        if (timeIO == true)
        {
            if (Time.current() >= timeindicator)
            {
                ScreenMsg(-1, "Elapsed Time:Min:" + timeindicator / 60 + " Secs:" + timeindicator + " Ticks:" + timeindicator * 30);
            }                
        }
        if (Time.current() >= timeindicator)
        {            
            timeindicator = timeindicator + timevalue;
        }

Last edited by Smokeynz; 03-21-2012 at 09:32 AM.
Reply With Quote
Reply

Thread Tools
Display Modes

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 Off

Forum Jump


All times are GMT. The time now is 04:29 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.