It is currently April 26th, 2024, 3:25 am
Get help with creating, editing & fixing problems with skins
-
benjam
- Posts: 26
- Joined: October 16th, 2009, 6:49 am
- Location: Utah, USA
Post
by benjam »
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:
Code: Select all
[MeasureDate]
Measure=Time
Format=%FT%TZ%z
[MeasureSun]
Measure=Script
ScriptFile=sun.lua
and my lua script:
Code: Select all
function Update()
M = SKIN:GetMeasure('MeasureDate')
v = M.GetStringValue()
print("v: ", v)
end
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...
Look at me still talking when there's Science to do.
-
benjam
- Posts: 26
- Joined: October 16th, 2009, 6:49 am
- Location: Utah, USA
Post
by benjam »
I code so much in JavaScript that the typing fingers take over before the brain can understand.
The Lua methods are called with a colon, not a dot.
Look at me still talking when there's Science to do.