URL:
<http://gna.org/bugs/?12556>
Summary: SoF - Caverns of Flame Hang on WML macro expansion
error
Project: Battle for Wesnoth
Submitted by: None
Submitted on: Sunday 11/02/2008 at 02:06 CET
Category: Bug
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Campaign
Status: None
Privacy: Public
Assigned to: None
Originator Email: [EMAIL PROTECTED]
Open/Closed: Open
Discussion Lock: Any
Release: 1.5.5
Operating System: windows XP
_______________________________________________________
Details:
At the end of Caverns of Flame in the Scepter of Fire campaign, the lava
"rises" and kills everybody. In version 1.5.5, the WML to cycle through all
the "lavadead" units is broken, causing a hang (or a very long busy loop, I'm
not sure) after the first unit dies. The problem is a fancy macro that fails
to expand correctly (note the variable named "VARIABLE" which should have
been "i"):
Macro:
{FOREACH_FORMAT lavadead i}
[kill]
x=$lavadead_i_x
y=$lavadead_i_y
animate=yes
[/kill]
{NEXT_FORMAT i}
Expansion:
[while]
[variable]
less_than="$lavadead.length"
name="i"
[/variable]
[do]
[set_variable]
name="lavadead_i_x"
to_variable="lavadead[$i].x"
[/set_variable]
[set_variable]
name="lavadead_i_y"
to_variable="lavadead[$i].y"
[/set_variable]
[kill]
animate="yes"
x="$lavadead_i_x"
y="$lavadead_i_y"
[/kill]
[set_variable]
add="1"
name="VARIABLE"
[/set_variable]
[/do]
[/while]
[clear_variable]
name="VARIABLE"
[/clear_variable]
Replacing "VARIABLE" with "i" in the save file allowed all the "lavadead"
units to die and the scenario to complete. I have attached a save file
directly before the hang for testing/confirmation.
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?12556>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs