It is currently December 7th, 2023, 6:37 am
Discuss the use of Lua in Script measures.
FerrantePescara
Posts: 2 Joined: January 13th, 2020, 4:07 pm
Post
by FerrantePescara » January 13th, 2020, 4:15 pm
I have created a measure to count the files in a specific folder.
Code: Select all
[MeasureFileCount]
Measure=Plugin
Plugin=FileView
Path=[MeasureImageFolder]
Type=FileCount
I can see that this works, because in about->skins, I can see the number and string for MeasureFileCount is 43.
However I now have a lua script in which I would like to retrieve this value:
Code: Select all
function Update()
measure = SKIN:GetMeasure('MeasureFileCount')
length = measure.GetValue()
print(length)
end
The problem here is that it just prints out nil.
Any clues as to why this is happening?
jsmorley
Developer
Posts: 22593 Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA
Post
by jsmorley » January 13th, 2020, 4:33 pm
FerrantePescara
Posts: 2 Joined: January 13th, 2020, 4:07 pm
Post
by FerrantePescara » January 13th, 2020, 5:29 pm
I guess that is what I get for trying to type it instead of copy pasting >.<
Totally glossed over the :
Thanks!
jsmorley
Developer
Posts: 22593 Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA
Post
by jsmorley » January 13th, 2020, 5:30 pm
FerrantePescara wrote: ↑ January 13th, 2020, 5:29 pm
I guess that is what I get for trying to type it instead of copy pasting >.<
Totally glossed over the :
Thanks!
Glad to help.