Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

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

Posted
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.

Posted

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

 

Posted
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(...)

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...