Follow-up Comment #7, bug #22774 (project wesnoth): I concur with tekelili.
*Reason 1)* This is how [insert_tag] name=tag variable=my_var [/insert_tag] works: It inserts the array my_var, but renames the array name from 'my_var' to 'tag'… … with one exception: a non-existent array is processed a different way And exceptions are bad in general. As tekelili pointed out, one must care about them in the code. *Reason 2)* I believe the effect of insert_tag shall depend uniquely on the tag name and the content of the variable (more precisely: of the array). In other words, next sentence should be true: _Let's have two instances of insert_tag. Their effect is equal if and only if both 'name=' and the content of 'variable' are equal._ But the sentence is not true with the current insert_tag mechanism. Variables 'nothing' (in A) and 'something' (in B) are different, but insert_tag still inserts an equal code: # A) {CLEAR_VARIABLE nothing} [insert_tag] name=redraw variable=nothing [/insert_tag] # B) [set_variables] name=something mode=replace [literal] [/literal] [/set_variables] [insert_tag] name=redraw variable=something [/insert_tag] _______________________________________________________ Reply to this item at: <http://gna.org/bugs/?22774> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Wesnoth-bugs mailing list Wesnoth-bugs@gna.org https://mail.gna.org/listinfo/wesnoth-bugs