WzComparerR2 icon indicating copy to clipboard operation
WzComparerR2 copied to clipboard

DumpImages.lua crashes on nil value during image extraction

Open nanpuhaha opened this issue 8 months ago • 0 comments

When running DumpImages.lua, the script crashes if ExtractPng() returns nil. This halts the entire execution, even if only one image causes an error.

====已经保存C:\WzComparerR2-Kagamia\WzComparerR2.LuaConsole\Examples\DumpImages.lua====
开始执行DumpImages.lua...
(extract)AllianceUI.img
...
(extract)UIToolTipNew.img
NLua.Exceptions.LuaScriptException: [string "chunk"]:62: attempt to index a nil value (local 'bmp')

This prevents the script from processing other valid images. A more graceful error handling mechanism is needed to ensure the script continues execution and provides error logs instead of terminating early.

nanpuhaha avatar Apr 22 '25 01:04 nanpuhaha