add error reporting to [insert_tag] if it has no variable= field
The lack of reporting here is somewhat annoying so i patched it.
This commit is contained in:
parent
c7c69f260b
commit
762efc278f
1 changed files with 3 additions and 0 deletions
|
@ -297,6 +297,9 @@ local function handle_event_commands(cfg)
|
|||
if cmd == "insert_tag" then
|
||||
cmd = arg.name
|
||||
local from = arg.variable
|
||||
if not from then
|
||||
helper.wml_error("[insert_tag] found with no variable= field")
|
||||
end
|
||||
arg = wesnoth.get_variable(from)
|
||||
if type(arg) ~= "table" then
|
||||
-- Corner case: A missing variable is replaced
|
||||
|
|
Loading…
Add table
Reference in a new issue