Improved error handling in [sound] a bit.

This commit is contained in:
Anonymissimus 2010-11-01 22:29:06 +00:00
parent e695df9901
commit d1c87949ed

View file

@ -357,7 +357,8 @@ function wml_actions.store_unit(cfg)
end
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
function wml_actions.store_locations(cfg)