Improved error message for a [gold] amount= failure,
...as it seems to happen quite frequently (three reports yet). (Fix for bug #15010.)
This commit is contained in:
parent
8f2c3486ff
commit
b8cad207f8
1 changed files with 1 additions and 1 deletions
|
@ -124,7 +124,7 @@ end
|
||||||
|
|
||||||
local function wml_gold(cfg)
|
local function wml_gold(cfg)
|
||||||
local team = wesnoth.get_side(cfg.side or 1)
|
local team = wesnoth.get_side(cfg.side or 1)
|
||||||
local amount = cfg.amount or
|
local amount = tonumber(cfg.amount) or
|
||||||
helper.wml_error("[gold] missing required amount= attribute.")
|
helper.wml_error("[gold] missing required amount= attribute.")
|
||||||
team.gold = team.gold + amount
|
team.gold = team.gold + amount
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue