In the following case, for example, the value of the measure used to remain 10 even after an error. Now it will default to 0 on error.
function Initialize()
i = 0
end
function Update()
if i < 5 then
i = i + 1
return 10
else
i() -- error here, execution stops
return 2
end
end
- Script: The !CommandMeasure argument must now be Lua code. For example:
!CommandMeasure "MeasureLuaScript" "someVar = 'hello'"
!CommandMeasure "MeasureLuaScript" "SomeFunc()"
- Added support for calling Lua functions with !PluginBang
- Removed old (undocumented) implementation for handling mouse actions
- Lua errors now contain the script file name only (instead of full path)
- Removed GetValue() (which has never worked) and deprecated GetStringValue(). The measure value should be returned on Update() now.
- Some related tweaks and cosmetic changes
- Fixed: Rainmeter crashes on initialization if Lua is invalid (e.g. syntax error)
- Fixed: Rainmeter crashes on mouse action if Lua file is not initialized
- Fixed: Measure=SCRIPT tries to process mouse actions even if corresponding function does not exist in the Lua file causing log to fill with 'nil value' warnings
- Mainly cosmetic changes to logging of erros in Measure=SCRIPT