Issue with code compared to FSX

For topics related to the creation of simulation objects (SimObjects). This includes development of aircraft, ground, and maritime vehicles.
Post Reply
rikoooo
Posts: 5
Joined: Tue Jul 17, 2012 2:01 am

Issue with code compared to FSX

Post by rikoooo »

Hi there,

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!
   
Erik
mpni
Posts: 1094
Joined: Thu Aug 09, 2018 10:37 am
Contact:

Re: Issue with code compared to FSX

Post by mpni »

Hi rikoooo
Have a look here :
https://www.prepar3d.com/forum/viewtopi ... 9&t=140756
It seems to be the same cause?
Regards
Michel
mpni
Posts: 1094
Joined: Thu Aug 09, 2018 10:37 am
Contact:

Re: Issue with code compared to FSX

Post by mpni »

Post Reply