Seeking tricky WML examples

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Soliton
Site Administrator
Posts: 1689
Joined: April 5th, 2005, 3:25 pm
Location: #wesnoth-mp

Re: Seeking tricky WML examples

Post by Soliton »

Expanding a macro inside a string (inside quotes) that contains itself quotes is specifically made an error. So it's not that the macro is expanded and the result is somehow invalid. You cannot get this error without a macro expansion.

I would guess that was done to prevent confusion with quotes inside and outside macros. Though I'm not sure it really helps. It breaks the simple concept of macro expansion just being text replacement and you can get confusion with quotes in macros either way.

To me this seems like something that would be better to remove. Of course that will not fix the formula example. It will break in other ways. But if you think about macro expansion as just text replacement it makes sense at least IMO.
"If gameplay requires it, they can be made to live on Venus." -- scott
Post Reply