Mdiaz380 Posted May 22, 2018 Report Posted May 22, 2018 Hi, I am starting to program with Flywithlua some switches. I started with some lights toggle commands and works perfect. But I haven’t been able to toggle Prop_sync. I found some commands on the .obj file, and I found the one for toggle prop sync, but Flywithlua gives an error saying that that command doesn’t exist. Where can I find the “official” comands for the Saab 340? thanks in advance
JGregory Posted May 22, 2018 Report Posted May 22, 2018 You should be able to find all Saab commands by loading the Saab in sim and goto Settings -> Keyboard, and then select a command from the list. The command string will be visible if you hover your mouse over the selection.
Mdiaz380 Posted May 23, 2018 Author Report Posted May 23, 2018 Thanks, I also tried that, but it doesn't work. I get the same message from FWL saying that commane doesn't exist. Later on the day I will copy the exact command I am using. Thanks for the help
JGregory Posted May 23, 2018 Report Posted May 23, 2018 6 hours ago, Mdiaz380 said: Thanks, I also tried that, but it doesn't work. I get the same message from FWL saying that commane doesn't exist. Later on the day I will copy the exact command I am using. Thanks for the help The prop sync switch in the Saab does not use a command for activation, it is a custom DataRef.
Mdiaz380 Posted May 23, 2018 Author Report Posted May 23, 2018 Wow, that change my program. where or how can I get Saab 340 Commnads and Datarefs? thanks a lot, I will check today and let you know.
Mdiaz380 Posted May 23, 2018 Author Report Posted May 23, 2018 I assigned as a Dataref without succes. I try: Dataref("prop_sync","LES/saab/prop/prop_sync_toggle","writable") And I get the error from FWL: Resources/plugins/FlyWithLua/Scripts/Caja_Botones.lua:94: attempt to call global 'Dataref' (a nil value) and then: Lua stopped Can you help me? Thanks again
Mdiaz380 Posted May 23, 2018 Author Report Posted May 23, 2018 Wait, it works with: create_switch(b_dch_2, "LES/saab/prop/prop_sync_toggle", 0, 1, 0) really odd ;-(
Ben Russell Posted May 24, 2018 Report Posted May 24, 2018 20 hours ago, Mdiaz380 said: I assigned as a Dataref without succes. I try: Dataref("prop_sync","LES/saab/prop/prop_sync_toggle","writable") And I get the error from FWL: Resources/plugins/FlyWithLua/Scripts/Caja_Botones.lua:94: attempt to call global 'Dataref' (a nil value) and then: Lua stopped Can you help me? Thanks again From page 12 of the manual https://github.com/X-Friese/FlyWithLua/blob/master/FlyWithLua/Documentation/FlyWithLua_Manual_en.pdf >DataRef("battery", "sim/cockpit/electrical/battery_on", "writable") >print(battery) The function signature you're looking for is DataRef(...) not Dataref(...)
Mdiaz380 Posted May 24, 2018 Author Report Posted May 24, 2018 1 hour ago, Ben Russell said: From page 12 of the manual https://github.com/X-Friese/FlyWithLua/blob/master/FlyWithLua/Documentation/FlyWithLua_Manual_en.pdf >DataRef("battery", "sim/cockpit/electrical/battery_on", "writable") >print(battery) The function signature you're looking for is DataRef(...) not Dataref(...) Ooops I didn’t know capital letters make a difference. THANKS A LOT
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now