#1
|
|||
|
|||
Exception Error in logs.txt
Hi In one of my missions I keep getting the following error report in the log
PHP Code:
Is this a mission thing or a game thing? I have no idea...thats why im posting here! Attached is a copy of the log showing this error (and a few others) |
#2
|
|||
|
|||
Hi mate,
are you running a script in your mission ? I had the same error while running a faulty C# script |
#3
|
|||
|
|||
Quote:
I will have a closer look at the scripts. Thanks! |
#4
|
|||
|
|||
May be a wrong object name
|
#5
|
|||
|
|||
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]; } } |
#6
|
|||
|
|||
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? |
#7
|
|||
|
|||
Quote:
"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 ). |
#8
|
|||
|
|||
Quote:
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. |
|
|