URL:
<http://gna.org/bugs/?19805>
Summary: CALL_FUNCTION uses wrong subtag
Project: Battle for Wesnoth
Submitted by: kernigh
Submitted on: Thu 14 Jun 2012 02:51:18 AM GMT
Category: Bug
Severity: 2 - Minor
Priority: 5 - Normal
Item Group: WML
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 1.10.3+svn (54405)
Operating System: OpenBSD 5.1
_______________________________________________________
Details:
CALL_FUNCTION in data/core/macros/event-utils.cfg wrote:
[fire_event]
name={EVENT_NAME}
[primary_unit]
x,y=$unit.x,$unit.y
[/primary_unit]
[second_unit]
x,y=$second_unit.x,$second_unit.y
[/second_unit]
[/fire_event]
This must be wrong: [fire_event] has no [second_unit] subtag. The wiki* says
[secondary_unit], not [second_unit]. Also, the code in data/lua/wml-tags.lua
seems to use [secondary_unit], not [second_unit].
*http://wiki.wesnoth.org/InternalActionsWML#.5Bfire_event.5D
This might be a good bug, because I never see any errors or warnings about
$second_unit, though I always use CALL_FUNCTION in places where $second_unit
does not exist. Right now, I see "error engine: failed to auto-store $unit at
(-999,-999)" and "warning engine: variable_info: retrieving member of
non-existent WML container, unit.x" (or unit.y) when I use CALL_FUNCTION in a
side turn event, but I see no such error or warning about $second_unit.
See discussion at http://forum.wesnoth.org/viewtopic.php?f=21&t=36989
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?19805>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs