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

                 Summary: [gold]amount=$variable in wml-tags.lua: error if
variable not initialized
                 Project: Battle for Wesnoth
            Submitted by: anonymissimus
            Submitted on: Tuesday 12/29/2009 at 16:11
                Category: Bug
                Severity: 2 - Minor
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.7.10
        Operating System: Linux

    _______________________________________________________

Details:

(I don't know how 1.6 behaved in this case, but due to general wml behaviour
nothing should happen...)
The following code reproduces the bug:

        [event]
                name=start
                
                {DEBUG_MSG ONE}
                [gold]
                        amount=10 #ok
                [/gold]
                {DEBUG_MSG TWO}
                [gold]
                        amount=$null #error
                [/gold]
                {DEBUG_MSG THREE}
                [gold]
                        amount=$iGold  #error
                [/gold]
                {DEBUG_MSG FOUR}
                {VARIABLE iGold null}
                [gold]
                        amount=$iGold #error
                [/gold]
                {DEBUG_MSG FIVE}
                {VARIABLE iGold $null}
                [gold]
                        amount=$iGold #error
                [/gold]
                {DEBUG_MSG SIX}
                {VARIABLE iGold 10}
                [gold]
                        amount=$iGold #ok
                [/gold]
        [/event]


The console error output is the same for all of the errors:

20091229 17:02:29 error scripting/lua:
/usr/share/games/wesnoth/data/lua/wml-tags.lua:129: attempt to perform
arithmetic on local 'amount' (a string value)
stack traceback:
        /usr/share/games/wesnoth/data/lua/wml-tags.lua:129: in function
</usr/share/games/wesnoth/data/lua/wml-tags.lua:125>







    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  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