Follow-up Comment #1, bug #16475 (project wesnoth):
You are hitting one of the issues with the change of semantic of LuaWML in
1.9. I don't consider it a bug yet, but I'm still unsure if it isn't making
it too hard for users.
Basically, on-the-fly variable substitution is no longer implicit and
systematic when passing a Lua table to a tag implemented in Lua. If one needs
it, one should specify it before calling a WML tag. In your case:
wml_actions.clear_variable(wesnoth.tovconfig {name = "array[$i]"})
Main advantage is speed for Lua to Lua communications, since there is no
longer conversion from Lua tables to Wesnoth userdata in most cases. For
plain WML, there is no change of behavior since the conversion to vconfig is
still there (and I don't intend to remove it). (Note: vconfigs are the
userdata with a "wml object" metatable.)
So I'm still considering various possibilities. For instance, I may
reinstantiate wesnoth.fire as a way to hide the conversions to vconfig. So,
for now, I will leave the bug open.
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?16475>
_______________________________________________
Message posté via/par Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs