WzComparerR2
WzComparerR2 copied to clipboard
DumpImages.lua crashes on nil value during image extraction
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.