• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

P3D v2 Adventures Using ContentErrorLog.txt...

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Using the new "ContentErrorLogging" feature of P3Dv2.1 has been an adventure. Using it, I've finally managed to clear up all of the modeldef.xml errors (there were only two, and both trivial: 50* instead of 50 *), as well as some missing textures (fresnel_ramp.bmp & another custom .dds Fresnel bitmap).

I've also cleared up the most critical errors in my custom FBS_GNS530_1.xml "gauge", to the point that it now works 99.9%.

Understand one thing though, the ContentErrorLog.txt contains snippets of "unraveled script," meaning that all @Macros except the first @Macro in the expression have been expanded. This makes searching for the specific script being bitched about "more challenging..." :censored:

I have two remaining "errors" which have got me stumped:
Code:
[error.10]
error=Gauge: FBS_GNS530_1
Error: Invalid script (command not found - perhaps a space is missing or there's an extra space?): "True"

[error.11]
error=Gauge: FBS_GNS530_1
Error: Invalid script (no command is more than 4 characters): "@kNavPageGroup (>C:fs9gps:1:currentGroup)
  (C:fs9gps:currentGroup) 4 == (C:fs9gps:group4currentPage) 0 == && if{  3 (>C:fs9
The only place where this bit of script is to be found is identical to that used in the gps_500.xml gauge!

Oh, and here was a charming one to find:
Code:
[error.10]
error=Gauge: FBS_GTX330
Error: Invalid script (command not found - perhaps a space is missing or there's an extra space?): "if"
Not too much to go on there! But, searching for "if " (with a blank space after) found this silly mistake...
if { 1 (>L:bt0,bool) }
 
BUT WAIT! There's a series of truly SCARY ONES in my GNS430. Apparently all of these previously working command events no longer exist!
Code:
error=Gauge: FBS_GNS430_2 
Error: Unknown Event ID: "G1000_MFD_NEAREST_BUTTON"
[error.29]
error=Gauge: FBS_GNS430_2 
Error: Unknown Event ID: "G1000_MFD_OBS_BUTTON"
[error.30]
error=Gauge: FBS_GNS430_2 
Error: Unknown Event ID: "G1000_MFD_MSG_BUTTON"
[error.31]
error=Gauge: FBS_GNS430_2 
Error: Unknown Event ID: "G1000_MFD_TERRAIN_BUTTON"
[error.33]
error=Gauge: FBS_GNS430_2 
Error: Unknown Event ID: "G1000_MFD_CLEAR_ALL_BUTTON"
This truly awful because I've been using these "alternate commands" to control a totally independent GNS430 so that it won't simply "mirror" the GNS530 controls... <sigh>
 
Bill,

Your error.11 in the original post is the same error I get in a totally different XML file. Think it's near a PageInit macro, but that is a common macro - can't be that code. I think once you get an error say your error.10 about the True, then all errors after that have to be suspect. The parse gets out of "sync". So concentrate on the first error in that gauge file, that may clear up other errors.

Code:
[error.5]
error=Gauge: G1000PFD
Error: Missing gauge image file: G1\G1000_hdg_knob.bmp

[error.6]
error=Gauge: G1000MFD
Error: Invalid script (no command is more than 4 characters): "@kNavPageGroup (>C:fs9gps:currentGroup)
    (C:fs9gps:currentGroup) 4 == (C:fs9gps:group4currentPage) 0 == and if{
    3 (>C:fs9gps:numberOfB

[error.7]
error=Gauge: G1000MFD
Error: Invalid script (command not found - perhaps a space is missing or there's an extra space?): "els"

[error.8]
error=Gauge: G1000MFD
Error: Invalid script (command not found - perhaps a space is missing or there's an extra space?): "els"

[error.9]
error=Gauge: G1000MFD
Error: Invalid script (no command is more than 4 characters): "@kNavPageGroup (>C:fs9gps:currentGroup) quit }
      (C:fs9gps:popupMenu) 0 != if{ 0 (>C:fs9gps:popupMenu) (C:fs9gps:blinkingFieldSaved) (>C:fs
 
Ron, the only place where "True" is used is in this command for the gps "map" display:
Code:
<TerrainShadow>True</TerrainShadow>
I'll try commenting out that command and test again in a bit. Now I should try to go to the store. We've had rain most of the night and I may be able to get my car out of the garage for the first time in three weeks! :rotfl:
 
Good luck getting to the store. We have 6 in of snow on the roads. and 9 feet piled up beside all the driveways/curbs. Expecting 2 in rain overnight. Trading in my car for a boat, as there are no storm sewers that are not covered in ice and snow. Should be fun tomorrow.
 
Now I should try to go to the store. We've had rain most of the night and I may be able to get my car out of the garage for the first time in three weeks! :rotfl:

Goodness.... 3 weeks?? Have a safe trip. Don't get stuck.
 
Guys, I would't pay much attention to the "ContextErrorLogging" feature as it seem to be flawed.
If you need to check what is supported and what is not, just take a look at 2.1 SDK, nothing seems to have changed much from FSX version.
For example, all G1000 events that threw those "unknown event" are all supported, or should be. If you still have doubts, check gauges.h in the SDK for KEY_G1000_etc event IDs, they should be there.
As for checking the entire set of AVars supported, including those not documented in the SDK, a simple C++ gauge that retrieves Avar names from a given ID number should be a good solution.

Tom
 
Tom, I have checked the v2.1 SDK, and those G1000MFD and PFD events are no longer present...

...for that matter they aren't in the FSX/A SDK either, yet they are used in the default gps_500.xml file which not only works, doesn't generate any errors. o_O

Aside from which, the ContentErrorLog.txt does serve a very useful purpose by listing .cfg file and XML syntax errors.
 
Last edited:
Confirmed, this no longer works, which is a damn shame because it was a pretty neat feature!
Code:
<TerrainShadow>True</TerrainShadow>
This error however has me puzzled:
Code:
[error.10]
error=Invalid variable (missing : - did you forget a macro?): HDGDisp1
However, the macro is present and I'll switched if I can see anything "wrong" with it!
Code:
<MacroName="HDGDisp1">
(A:AUTOPILOT HEADING LOCK, bool)
</Macro>
Since I use this macro frequently, I suppose I can do a search/replace and "fix it" that way...
 
Tom, I have checked the v2.1 SDK, and those G1000MFD and PFD events are no longer present...
...for that matter they aren't in the FSX/A SDK either, yet they are used in the default gps_500.xml file which not only works, doesn't generate any errors. o_O
Aside from which, the ContentErrorLog.txt does serve a very useful purpose by listing .cfg file and XML syntax errors.

Bill, you're right I didn't check for G1000_MFD_MSG, OBS, etc specifically, just generic G1000's; but I did notice that, as you state, they are not listed in FSX sdk/gauges.h. Funny they worked for you before! It seems that "hidden" events and variables were not ported to P3D...

As for your macro, the correct spelling would be <Macro Name="HDGDisp1"> (mind the space between Macro and Name), providing it's FS9 schema ;)

Tom
 
Bill,

Perhaps the error log does not like Macros that consist only of a single A: variable?
 
Bill, you're right I didn't check for G1000_MFD_MSG, OBS, etc specifically, just generic G1000's; but I did notice that, as you state, they are not listed in FSX sdk/gauges.h. Funny they worked for you before! It seems that "hidden" events and variables were not ported to P3D...

As for your macro, the correct spelling would be <Macro Name="HDGDisp1"> (mind the space between Macro and Name), providing it's FS9 schema ;)

Tom
Tom, the point is that the default fs9gps!gps_500.xml "gauge" has those exact same "missing events" in it. Not only do they work, they also generate no error messages in the ContentErrorLog.txt file...

...this is just bizzare! :yikes:

As for the macro, it is entered correctly in the XML script:
Code:
<MacroName="APon">
(A:Autopilot master, bool)
</Macro>
<Macro Name="HDGDisp1">
     (A:AUTOPILOT HEADING LOCK, bool)
</Macro>
<Macro Name="NAVDisp1">
     (A:AUTOPILOT NAV1 LOCK, bool)
</Macro>
<Macro Name="APRDisp1">
     (A:AUTOPILOT APPROACH HOLD, bool)
</Macro>
<Macro Name="REVDisp1">
     (A:AUTOPILOT BACKCOURSE HOLD, bool)
</Macro>
<Macro Name="NAVDisp2">
     @NAVDisp1 @HDGDisp1 and
</Macro>
@tgibson (the other Tom), note that all of the macros above work except the first one "HDGDisp1"
 
Tom, the point is that the default fs9gps!gps_500.xml "gauge" has those exact same "missing events" in it. Not only do they work, they also generate no error messages in the ContentErrorLog.txt file...

...this is just bizzare! :yikes:

But the "standard" GPS 500 has those events defined as token vars in gauges.h, and also are described in FSX(9) sdk. I think you may be aware that G1000 uses a different instance of fs9gps than gps500, perhaps this has something to do with the problem.

Tom
 
Those are not valid G1000 buttons and should never have been defined. However, they are valid GPS buttons and are indeed defined as such:

KEY_GPS_NEAREST_BUTTON
KEY_GPS_OBS_BUTTON

There are no such items on any G1000 in the real world as all of those functions are softkeys.
 
Updated Report on the "repair process..."

First of all, what I shared here was just from a quick glance at the ContentErrorLog.txt for the Milviz C310R, but that number of "errors" included all XML "gauges" as well as embedded XML in the model, and various .cfg file entries.

On closer examination however, I discovered that many of the same errors were repeated in the log ten or more times. Furthermore, once I started "fixing" the errors in the report (after having commented out all but one "gauge" at a time), I found that quite a few (actually most of 'em) were what I'll term "cascading errors," meaning that once I'd fixed the real error, a dozen or so immediately following in the report were also now "fixed." The conclusion of course is that once the "trigger error" was fixed, all subsequent errors that depended on the "trigger error" were now cleared as well!

The condensed version of the above is that in my GNS530 there were really only six minor syntax errors, even though the raw report had nearly one hundred listed!

Quite frankly the hardest challenge for the developer lies in interpreting the error log itself, since all @macros are "expanded" in the report, which makes searching for the relevant portion of the raw XML script more than a bit difficult.

I'm still working on this one project, but already I've eliminated most of the "syntax errors". The remaining few are turning out to be stubborn, as the reported error text is obtuse as hell! I'll keep plugging away though until I wind up with a totally "clean report," meaning a totally blank ContentErrorLog.txt file!
yahoo.gif
 
But the "standard" GPS 500 has those events defined as token vars in gauges.h, and also are described in FSX(9) sdk. I think you may be aware that G1000 uses a different instance of fs9gps than gps500, perhaps this has something to do with the problem.

Tom
Yes, those were previously extant in the FS9 gauges.h file. But, that doesn't explain why those obviously depecrated events are (a) still present in the default gps_500.xml file, nor (b) that they are not reported as 'errors' by the new parser, nor (c) that they still work!

As for the G1000, according to the mfd.xml file, it is using the same instance of the fs9gps as the G500:
Code:
<CustomDraw id="CustomDraw" Name="fs9gps:map">
 
Does case matter for macros? I was debugging a part of the code where nothing looked wrong. Only kNavPageGroup, but the macro is kNAVPageGroup. Once I changed the lower case to upper the error went away. The error really did not affect the gauge (at least I don't think so), but the error is now gone.

Was case always a requirement for macros before?

edit KNAV to kNAV
 
Last edited:
That's peculiar. All of my GPS units use that same macro with the lower case "k" with no problems reported.
Code:
<MacroName="kNAVPageGroup">0</Macro>
Did you change to uppercase "K" everywhere, or just the macro definition?

After four solid days of frustration, I finally got all the XML and other errors cleaned up except for the weird one about ") " and four of the evaluates to neither TRUE or FALSE...
 
OOppss sorry - it should have been kNAVPageGroup - only the AV part was lower case.

The code called the macro with @kNAVPageGroup except one part had kNavPageGroup and that was showing in the log.

To me case matters for the error log anyway.
 
Last edited:
Back
Top