How to store a value in Local variable (L:) in Lua ?

For topics related to the creation of simulation objects (SimObjects). This includes development of aircraft, ground, and maritime vehicles.
bokdany
Posts: 25
Joined: Thu Apr 09, 2015 9:15 am

How to store a value in Local variable (L:) in Lua ?

Postby bokdany » Mon Feb 04, 2019 3:29 pm

Hi, I trying to store a simple value in a local variable in the following Lua code.

Code: Select all

!Lua local val = varget("L:myVar","Number") val = 999.0 varset("L:myVar","Number",val)
This code is used for material scripting (P3D v4.2) but it's seems doesn't work.
Some one have a idea of what is wrong?
Thanks by advance.

Return to “Simulation Object Development Questions”

Who is online

Users browsing this forum: No registered users and 15 guests