Getting Measure Data in a Lua script
Posted: March 16th, 2018, 4:29 am
I'm trying my hand at Lua scripting and am having an issue getting the value from a measure into the script.
Here is what I have in my ini file:
and my lua script:
The only thing I'm getting out in the debug output is
What am I doing wrong? I'm a complete Lua newb, but a pretty good programmer...
Here is what I have in my ini file:
Code: Select all
[MeasureDate]
Measure=Time
Format=%FT%TZ%z
[MeasureSun]
Measure=Script
ScriptFile=sun.lua
Code: Select all
function Update()
M = SKIN:GetMeasure('MeasureDate')
v = M.GetStringValue()
print("v: ", v)
end
Code: Select all
v: nil