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:
Guillaume Melquiond 2009-12-30 07:42:13 +00:00
parent 8f2c3486ff
commit b8cad207f8

View file

@ -124,7 +124,7 @@ end
local function wml_gold(cfg)
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.")
team.gold = team.gold + amount
end