Lua error display

Lua error display

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Lua error display

Post by Silentwings »

Saves much hunting through infologs! Collects lua warnings/errors and displays neatly.

(1) Requires chili <3.
(2) So as it can detect luarules reload, in the file "luarules/main.lua" you need to add Spring.Echo('LuaRules Entry Point: \"main.lua\"'), or whatever is the equivalent for your game.

Image

It will only display errors in the part of the infolog that is visible to the console (for example, it won't spot errors in infolog about in unitdefs). Has buttons to clear, show all since last luaui/luarules reload, or just show all. Warnings (meaning, any system message containing the word "warning") are orange, errors (same idea) are red. Duplicates are recognized, handles up to 50 different msgs at once, etc.
Attachments
dbg_err_console.lua
(6.86 KiB) Downloaded 16 times
screen00664.jpg
(234.7 KiB) Not downloaded yet
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Lua error display

Post by Beherith »

This widget is so cash for clumsy coders like me. Instant and persistant visual confirmation of lua errors, just what the doctor prescribed!
Post Reply

Return to “Lua Scripts”