AM 4.1.3 Snippet wrong code

Discuss suspected bugs with other users and Sim Innovations Staff

Moderators: Ralph, russ

Post Reply
Message
Author
JackZ
Posts: 2181
Joined: Mon Feb 22, 2016 1:02 pm

AM 4.1.3 Snippet wrong code

#1 Post by JackZ »

Hi Message to @Corjan:

I noticed a small error when using in the editor, the right click: Code snippets/Flight Simulator/FS 2020 variable subscribe

The code pasted in the editor is I guess an old version:

Code: Select all

  -- This function will be called when new data is available from FSX or Prepar3D
 function new_altitude_callback(altitude)
   -- Prints the altitude in the debug window
   print("New altitude: " .. altitude)
 end

 -- subscribe to FSX / Prepar3D variables on the databus
 fsx_variable_subscribe("INDICATED ALTITUDE", "Feet", new_altitude_callback)
it should be instead fs2020_variable_subscribe() according to the Wiki
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

Post Reply