So, I have this code which is supposed to return the last ILS frequency from a list, however, it always returns the first frequency instead of the latest. This code works perfectly in FSX SP2 or Acceleration I get the latest frequency. But in Prepar3D v4 and v5 it gives me only the first frequency instead of the latest. What could possibly be wrong ??? Thank you
Code: Select all
%( 0 s3 s4 (C:fs9gps:WaypointAirportFrequenciesNumber, number) s2 0 > (C:fs9gps:WaypointAirportApproachName, string) 0 3 ssub 'ILS' scmp 0 == && )
%{if}
%(0 sp1)
%{loop}
%(l1 (>C:fs9gps:WaypointAirportCurrentFrequency, number))
%((C:fs9gps:WaypointAirportFrequencyName, string) (C:fs9gps:WaypointAirportApproachName, string) scmp 0 == )
%{if}\{nr}
%((C:fs9gps:WaypointAirportFrequencyValue, mhz) s3 )
%{end}
%(l1 ++ s1 l2 < )
%{next}
%{end}
%(l3 (>L:GPS1 ILS Frequency, mhz))%!3.3f!