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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue