Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1570

Bugs & Feature Suggestions • Re: [BUG] Multiple Lua functions calling CURRENTSECTION

$
0
0
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:

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
[SkinFolder]\Skin.ini:

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
Preview:
Lua SI & GO.jpg
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.

Statistics: Posted by Yincognito — 22 minutes ago



Viewing all articles
Browse latest Browse all 1570

Trending Articles