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

                 Summary: Engine treats non-existent variables as 0
                 Project: Battle for Wesnoth
            Submitted by: pentarctag0n
            Submitted on: Sun 14 Feb 2016 08:55:52 PM UTC
                Category: Feature Request
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: WML
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.13.2+dev
        Operating System: Linux Mint

    _______________________________________________________

Details:

The engine interprets indexes referenced by variables that don't exist as 0:


[event]
  name="start"
  
  [set_variables]
    name="test"
    mode="append"
    
    [value]
      val=0
    [/value]
    [value]
      val=1
    [/value]
    [value]
      val=2
    [/value]
  [/set_variables]
  
  [set_variables]
    name="test[$tes[2].val]"
    mode="insert"
    
    [value]
      val=3
    [/value]
    
  [/set_variables]
  
[/event]


I think in this case the operation (in this case an insert) should print a
warning to the stderr rather than trying to make it work.
Currently the above code results in this: https://i.imgur.com/sFDAXaI.png




    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  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