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

                 Summary: the conditional macro IF is too specific, should be
IF_VARIABLE
                 Project: Battle for Wesnoth
            Submitted by: None
            Submitted on: Thursday 07/26/2007 at 19:07 CEST
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: WML
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: [EMAIL PROTECTED]
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.3.6
        Operating System: linux

    _______________________________________________________

Details:

when converting my maps from my own macros to those shipped in 1.3.6 I
stumbled upon the very inconveniently named IF macro. The IF macro is used in
1.3.6 to make a conditional check against a variable, and not a generic
conditional check.

my code was based upon a simpler IF macro:

#define HS_TELEPORT_LEADERS
        {FOR_EACH leader 1 6 (
                {IF (
                        {FILTER_UNIT (side=$leader)}
                ) (
                        {SET_VARIABLE StartX format $Player.$leader|.StartX}
                        {SET_VARIABLE StartY format $Player.$leader|.StartY}
                        {TELEPORT (side=$leader) $StartX $StartY}
                )}
        )}
#enddef

The IF in 1.3.6 is not capable of checking for units, among other things, and
should be named after what it does. My proposed solution is that it be changed
to IF_VARIABLE or IF_VAR to more accurately reflect what it does as well as
leave room for a more generic IF macro.

Cheers, the Roze




    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  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