To simplify things to the max, here's the essence of it (the 1st function call works, the 2nd doesn't)...
[SkinFolder]\@Resources\S.lua:[SkinFolder]\Skin.ini:Preview: Notice how in the 2nd call the default value of 'M' isn't applied in GetVariable() either, besides not printing the current section value. The variable number of arguments doesn't play a part in this, since it has been eliminated to help find the source of the problem.
[SkinFolder]\@Resources\S.lua:
Code:
function F(n) print(SKIN:GetVariable('CURRENTSECTION')) local s = SKIN:GetVariable('CURRENTSECTION','M') return SKIN:GetMeter(s) and SKIN:GetMeter(s):GetOption('Meter') or 'Error'end
Code:
[Rainmeter]Update=1000AccurateText=1DynamicWindowSize=1BackgroundMode=2SolidColor=0,255,0,255---Measures---[S]Measure=ScriptScriptFile=#@#S.luaUpdateDivider=-1---Meters---[M]Meter=StringAntiAlias=1Text=S = #CURRENTSECTION##CRLF#F = [&S:F(0)]#CRLF#F = [&S:F(0)]UpdateDivider=-1DynamicVariables=1
Statistics: Posted by Yincognito — 22 minutes ago