It is currently March 31st, 2020, 9:55 am

SKIN GetMeasure GetValue returns nil

Discuss the use of Lua in Script measures.
FerrantePescara
Posts: 2
Joined: January 13th, 2020, 4:07 pm

SKIN GetMeasure GetValue returns nil

Post by FerrantePescara »

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?
User avatar
jsmorley
Developer
Posts: 20426
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: SKIN GetMeasure GetValue returns nil

Post by jsmorley »

FerrantePescara
Posts: 2
Joined: January 13th, 2020, 4:07 pm

Re: SKIN GetMeasure GetValue returns nil

Post by FerrantePescara »

I guess that is what I get for trying to type it instead of copy pasting >.<
Totally glossed over the :

Thanks!
User avatar
jsmorley
Developer
Posts: 20426
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: SKIN GetMeasure GetValue returns nil

Post by jsmorley »

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.