URL:
  <http://gna.org/bugs/?25586>

                 Summary: Another [heal_unit] Lua error
                 Project: Battle for Wesnoth
            Submitted by: sigurdfdragon
            Submitted on: Sat 11 Mar 2017 07:05:42 PM UTC
                Category: Bug
                Severity: 4 - Important
                Priority: 5 - Normal
              Item Group: WML
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.13.6+dev
        Operating System: Win 7 x64

    _______________________________________________________

Details:

the following:
[heal_unit]
[/heal_unit]
or any [heal_unit] without an amount key

according to the wiki
https://wiki.wesnoth.org/DirectActionsWML#.5Bheal_unit.5D
amount defaults to full if absent.

but currently produces the following error

error scripting/lua: attempt to compare number with nil
stack traceback:
[C]: in function 'math.max'
lua/wml-tags.lua:664: in field 'heal_unit'
[string "..."]:10: in local 'bytecode'
lua/wml-tags.lua:265: in local 'cmd'
lua/wml-utils.lua:145: in field 'handle_event_commands'
lua/wml-flow.lua:6: in function <lua/wml-flow.lua:5>


I can see that it's something to do with the cfg.amount being nil when
math.max is invoked, but I'm not sure what to do about it.


To reproduce:
launch UtBS, (either version) cl to level 8, clear the fog and move a unit to
either of the blue runes


It seems likely this was introduced in: 
https://github.com/wesnoth/wesnoth/commit/8822dacd92ebf290308b7deb351ac133af819a4a





    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?25586>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to