generous error handling in [scroll_to]
This commit is contained in:
parent
61c2633b24
commit
3b4ac4ef07
1 changed files with 3 additions and 1 deletions
|
@ -270,7 +270,9 @@ function wml_actions.switch(cfg)
|
|||
end
|
||||
|
||||
function wml_actions.scroll_to(cfg)
|
||||
wesnoth.scroll_to_tile(cfg.x, cfg.y, cfg.check_fogged)
|
||||
local x = tonumber(cfg.x) or helper.wml_error("invalid x= in [scroll_to]")
|
||||
local y = tonumber(cfg.y) or helper.wml_error("invalid y= in [scroll_to]")
|
||||
wesnoth.scroll_to_tile(x, y, cfg.check_fogged)
|
||||
end
|
||||
|
||||
function wml_actions.scroll_to_unit(cfg)
|
||||
|
|
Loading…
Add table
Reference in a new issue