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

Lua Scripting • Why does this nested inline Lua function crash Rainmeter only when used in MeterStyle?

$
0
0
I have a function that compares two argument values, and returns a third arg if true otherwise returning an forth arg.

The first arg passed to this function is itself a separate inline function that checks the `#CURRENTSECTION#` for the presence of an option, returning it if found.

I'm using this for the MeterStyle to conditionally add another style if a condition is met, inline rather than relying on a peripheral measure or meter-specific handling via Lua.

The line looks like the following:

Code:

MeterStyle=SomeStyle | AnotherStyle [&Sc:Repl('[&Sc:Chk('#CURRENTSECTION#','SomeOption')]','MyVal','| YetAnotherStyle','')]
This crashes Rainmeter (edit: on 4.5.17, just noticed there's a .18 out, edit 2: crashes with it, too). However if the same function line is used for say a `Text` option value it works as expected. I've tried changing the inner nested function to double quotes as a test but no difference.

Alternatively if I replace the inner nested `Chk` function with some other function that doesn't use `SKIN:GetMeter()` and `GetOption()` and instead just returns some static arg back then it doesn't crash.

Is this some inherent limitation of using `SKIN` bangs within a function within MeterStyle or just a bug?

Statistics: Posted by Crest — Yesterday, 1:12 pm



Viewing all articles
Browse latest Browse all 781

Trending Articles