I built up a rather large campaign file with many macros after getting all excited by the rapidly expanding possibilities. Anyway, I just loaded this campaign into b49 and the whole thing is now ridden with bugs to the point of being unuseable. All the macros work as expected in b47, but not b49 (I haven't tried b48), so I'm not sure if I have been writing macros that work under bugs that have since been fixed, or new bugs have been introduced in macro parsing.
Particular issues:
- Macros that skip large blocks:
One macro skips over all user input, with no error messages, then outputs normally at the end: it does not seem to be a length issue, but something peculiar with a particular section. It work normally when I remove a section that assembles a string property based on values of token properties, referenced by name as 'variables', rather than getProperty(), which used to work fine. In fact, getProperty() doesn't seem to work in my campaign file created in an older version and opened in b49, but does work in new campaigns. Given this instability, referencing them directly as 'variables' seems more universally supported.
Another outputs the code intended to build the output message as a string literal, rather than parsing & executing the macro code. It seems like there might be something in the code that upsets the parser and then all following code gets mangled, which may explain the other issues. - Input fields of type "LIST" are instead being displayed as TEXT, with the variable name as the prompt, rather than the intended message. This happens when there is a carriage return in the string list being assigned to a variable within a code block (I sometimes did this for really long lists because I don't wrap lines for code in my text editor).
This works fine:
Code:
[inputList = "1,2,3,4"]
[cancel = input("input1 |"+ inputList +"| list input | LIST ")]
This behaves oddly, as described above in 1.3b49, but used to work fine in 1.3b47:
Code:
[inputList = "1,2,
3,4"]
[cancel = input("input1 |"+ inputList +"| list input | LIST ")]
- Errors of the type 'Could not execute the command: Unknown option name "cancel" '. 'cancel' is the variable I use to store the result of an input() function. This doesn't happen in all cases, so I'm trying to figure out what might be responsible.
EDIT: it was a colon ':' in the comments within the input code.
This works:
Code:
[cancel=input(
"AttackName |"+ "- Generate New -"+AttackActionList +"| Load Saved (or generate new) | LIST ", // from list of saved attack actions empty implies generic 'on the fly'
]
This Does NOT work in 1.3b49, but did in 1.3b47:
Code:
[cancel=input(
"AttackName |"+ AttackActionList +"| Load Saved (or generate new) | LIST ", // from list of saved actions: empty implies generic 'on the fly'
]
Any idea what is responsible for these changes and how to "fix" / upgrade the macros to run in the newer versions?
If it's relevant, I have been commenting at ends of lines with "// comment" within HTML comments, which had no effect in previous builds. Even though the comment // was not working, I added them with the expectation that when this was fixed, it would not cause problems. Mind you, even removing comments does not fix the "bugs" in my macros, so I'm not sure they are responsible.
Some references on commenting macros (without breaking them) would be useful, for those interested in writing documentation

I really should just wait until macro development stabilizes before engaging on these epic macro building ventures ... good thing for backup versions
