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.
rikoooo
Posts: 5
Joined: Tue Jul 17, 2012 2:01 am

Issue with code compared to FSX

Postby rikoooo » Fri Dec 11, 2020 2:42 pm

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: 206
Joined: Thu Aug 09, 2018 10:37 am

Re: Issue with code compared to FSX

Postby mpni » Fri Dec 18, 2020 8:23 am

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: 206
Joined: Thu Aug 09, 2018 10:37 am

Re: Issue with code compared to FSX

Postby mpni » Fri Dec 18, 2020 9:59 am



Return to “Simulation Object Development Questions”

Who is online

Users browsing this forum: No registered users and 9 guests