Improved error handling in [sound] a bit.
This commit is contained in:
parent
e695df9901
commit
d1c87949ed
1 changed files with 2 additions and 1 deletions
|
@ -357,7 +357,8 @@ function wml_actions.store_unit(cfg)
|
||||||
end
|
end
|
||||||
|
|
||||||
function wml_actions.sound(cfg)
|
function wml_actions.sound(cfg)
|
||||||
wesnoth.play_sound(cfg.name, cfg["repeat"])
|
local name = cfg.name or helper.wml_error("[sound] missing required name= attribute")
|
||||||
|
wesnoth.play_sound(name, cfg["repeat"])
|
||||||
end
|
end
|
||||||
|
|
||||||
function wml_actions.store_locations(cfg)
|
function wml_actions.store_locations(cfg)
|
||||||
|
|
Loading…
Add table
Reference in a new issue