Difference between revisions of "Talk:ReferenceWMLDump"

From The Battle for Wesnoth Wiki
m (removed outdated discussion)
(no, wesnoth 1.2.5 does not have complex substitution everywhere ...)
Line 1: Line 1:
 +
Kernigh wrote:
 +
: Since Wesnoth 1.1.5, all simple substitution was eliminated in favor of complex substitution, which is more versatile.
  
 +
There is no source for this claim, and my tests contradict it: In wesnoth 1.2.5, the WML snippet
 +
{VARIABLE foo_bar 42}
 +
{VARIABLE b bar}
 +
[gold]
 +
side=1
 +
amount=$foo_$b
 +
[/gold]
 +
does nothing, but
 +
{VARIABLE foo_bar 42}
 +
{VARIABLE b bar}
 +
{VARIABLE_OP temp format $foo_$b}
 +
[gold]
 +
side=1
 +
amount=$temp
 +
[/gold]
 +
adds 42 gold to side 1. I have therefore reverted the edit. Please only change the content of this page if you are sure you are right.
 +
 +
[[User:Meriton|Meriton]] 15:25, 15 July 2007 (CEST)

Revision as of 13:25, 15 July 2007

Kernigh wrote:

Since Wesnoth 1.1.5, all simple substitution was eliminated in favor of complex substitution, which is more versatile.

There is no source for this claim, and my tests contradict it: In wesnoth 1.2.5, the WML snippet

			{VARIABLE foo_bar 42}
			{VARIABLE b bar}
			[gold]
				side=1
				amount=$foo_$b
			[/gold]

does nothing, but

			{VARIABLE foo_bar 42}
			{VARIABLE b bar}
			{VARIABLE_OP temp format $foo_$b}
			[gold]
				side=1
				amount=$temp
			[/gold]

adds 42 gold to side 1. I have therefore reverted the edit. Please only change the content of this page if you are sure you are right.

Meriton 15:25, 15 July 2007 (CEST)