There are multiple problems here, so welcome to the Rainmeter/Lua mashup world.
First, from the Rainmeter side, the Rainmeter parser doesn't always know when to parse a string and when not to. In this case, you will find that if you remove the spaces from the conditional expression, it will work. So this...
Code:
String=[&Script:conditional((10>18),'Yes','No')]
BUT WAIT! Before you try it, you need to fix your Lua code. The problem is you've missed this tidbit from the Lua manual (section 2.2, Booleans)
So change your code to:Beware that, unlike some other scripting languages, Lua considers both zero and the empty string as true in conditional tests.
Code:
if cond == 0 then return false_str else return true_str end
Code:
print("cond = " .. cond .. " and is of type " .. type(cond))
Statistics: Posted by SilverAzide — Yesterday, 10:50 pm