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 05-24-2011, 07:10 PM
Longbone Longbone is offline
Approved Member
 
Join Date: Aug 2010
Posts: 49
Default

May be a wrong object name
Reply With Quote
  #2  
Old 05-24-2011, 07:19 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Maybe it is worth always checking that an object exists before doing smth with it, e.g.
Code:
        {
            if (bp != null)
                bp.destroy();         
        }
Code:
 {
                if (enemyGG[i] != null)
                    if (result.Pos().distance(ref attackerPos) > enemyGG[i].Pos().distance(ref attackerPos)) 
                        { result = enemyGG[i]; }
            }
Reply With Quote
  #3  
Old 05-25-2011, 06:24 AM
Flashman Flashman is offline
Approved Member
 
Join Date: May 2010
Posts: 109
Default

Im still just as confused!

I have been through the server log looking for a pattern but cannot see anything specific. I looked at the log for different runs of the mission hoping to see that the problem started at the same time on each run (therefore being tied to a mission or something) but, again no obvious cause.

This object thats not referenced... I have no idea what it could be. All my bombing missions (which run as submissions) just area bomb a specific area.

Some fighters escort bombers. I wonder if the escort is getting separated and when it gets to the next waypoint it cant find the group they are supposed to be escorting? WOuld this cause the problem?

Ataros, I haven't tried your bits of code, I have no idea what they do or where to put them! Do they need to be tied to a specific object or missions?
Reply With Quote
  #4  
Old 05-25-2011, 07:14 AM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Quote:
Originally Posted by Flashman View Post
Ataros, I haven't tried your bits of code, I have no idea what they do or where to put them! Do they need to be tied to a specific object or missions?
No.
"Object != null" is a check if the object exists. If your code does smth to an object but it does not exist you get the exception I believe. Make sure you check "Object != null" before any action in your code.

I may be wrong. Always post your complete code if you want quick help without guessing from someone who really knows C# (not me ).
Reply With Quote
  #5  
Old 05-25-2011, 08:39 AM
SYN_Flashman SYN_Flashman is offline
Approved Member
 
Join Date: Feb 2011
Posts: 48
Default

Quote:
Originally Posted by Ataros View Post
No.
"Object != null" is a check if the object exists. If your code does smth to an object but it does not exist you get the exception I believe. Make sure you check "Object != null" before any action in your code.

I may be wrong. Always post your complete code if you want quick help without guessing from someone who really knows C# (not me ).

I will post it later thnis evening when im home. My mission actually has 3 scripts to just to add to the confusion!

Essentially there is a primary script which is tied to the main mission. This has the despawn script and all of that plus at specific times is starts two submissions (one for red, one for blue). These two submissions themselves contain nothing, just an empty map, however they have scripts which spawn a number of sub-sub missions over a period of about three hours. These are the actual planes going to targets etc.

The purpose behind this is that the primary script sets the submissions going so they are repeated every three hours and it is intended to allow the server to be continuously operating.
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 10:12 PM.


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