mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-06 21:43:45 +00:00
fixup! Improve error message when Lua config helper functions are not passed a config as the first argument
This commit is contained in:
parent
4849756835
commit
80cdac5b89
@ -40,7 +40,7 @@ local function ensure_config(cfg)
|
||||
return true
|
||||
end
|
||||
if type(cfg) == 'userdata' then
|
||||
if getmetatable(cfg) == 'vconfig' then return true end
|
||||
if getmetatable(cfg) == 'wml object' then return true end
|
||||
helper.wml_error("Expected a config or vconfig but got " .. getmetatable(cfg))
|
||||
else
|
||||
helper.wml_error("Expected a config or vconfig but got " .. type(cfg))
|
||||
|
Loading…
x
Reference in New Issue
Block a user