XML Parser doesn't evaluate <Test> expression

Version: 1.6.34.0

Frequency: Consistently

Severity: High
Similar MSFS 2020 issue: Not a problem

Bug description:

Using Asobo (not _EX1) code, the following expression evaluates correctly in FS2020 but not in FS2024:

<Condition>
	<Test>
		<GreaterOrEqual>
			<Value>NUM_STATES</Value>
			<Number>3</Number>
		</GreaterOrEqual>
	</Test>
</Condition>

This expression evaluates correctly in both:

<Condition Check="NUM_STATES" Different="2">
</Condition>

The issue is that if NUM_STATES was set to less than 2 it may not work at all, so I’m trying to avoid it.

Is there a syntax error in my code, or is there a problem with the parser?

This was used in a custom switch and the FS2024 console reported that it couldn’t find a _Toggle input event, but never anything about the expression.

Hello @SWS-AlexVletsas

I assume you are using version 2 of the ModelBehaviors.
If so, the <Value> has been deprecated: Model Behaviors
(<Number> and <Text> are not deprecated, that’s a mistake from the documentation)

You will want to replace
<Value>NUM_STATES</Value>
with
<Number>#NUM_STATES#</Number>

Regards,
Sylvain

Are these changes documented in the SDK doc so we can convert our templates?

They’re mentioned at the bottom of the page I linked above, in the Behavior Version Improvements section.

1 Like